IO

class psi4.core.IO

Bases: pybind11_builtins.pybind11_object

docstring

Methods Summary

change_file_namespace(fileno, ns1, ns2) Change file number from ns1 to ns2
close(self, unit, keep) Close unit.
get_default_namespace() Get the default namespace (for PREFIX.NAMESPACE.UNIT file numbering)
getpid(self) Lookup process id
open(self, unit, status) Open unit.
open_check(self, unit) Return 1 if unit is open
rehash(self, unit) Sync up the object to the file on disk by closing and opening the file, if necessary
set_default_namespace(ns) Set the current namespace (for PREFIX.NAMESPACE.UNIT file numbering)
set_pid(self, pid) Set process id
shared_object() Return the global shared object
state(self) Return 1 if PSIO library is activated
tocclean(self, unit, key) Delete all TOC entries after the given key.
tocentry_exists(self, arg0, arg1) Checks the TOC to see if a particular keyword exists there or not
tocprint(self, arg0) Print the table of contents for the given unit
tocwrite(self, arg0) Write the table of contents for passed file number

Methods Documentation

change_file_namespace(fileno: int, ns1: str, ns2: str) → None

Change file number from ns1 to ns2

close(self: psi4.core.IO, unit: int, keep: int) → None

Close unit. If keep == 0, will remove the file, else keep it

get_default_namespace() → str

Get the default namespace (for PREFIX.NAMESPACE.UNIT file numbering)

getpid(self: psi4.core.IO) → str

Lookup process id

open(self: psi4.core.IO, unit: int, status: int) → None

Open unit. Status can be PSIO_OPEN_OLD (if existing file is to be opened) or PSIO_OPEN_NEW if new file should be open

open_check(self: psi4.core.IO, unit: int) → int

Return 1 if unit is open

rehash(self: psi4.core.IO, unit: int) → None

Sync up the object to the file on disk by closing and opening the file, if necessary

set_default_namespace(ns: str) → None

Set the current namespace (for PREFIX.NAMESPACE.UNIT file numbering)

set_pid(self: psi4.core.IO, pid: str) → None

Set process id

shared_object() → psi4.core.IO

Return the global shared object

state(self: psi4.core.IO) → int

Return 1 if PSIO library is activated

tocclean(self: psi4.core.IO, unit: int, key: str) → None

Delete all TOC entries after the given key. If a blank key is given, the entire TOC will be wiped

tocentry_exists(self: psi4.core.IO, arg0: int, arg1: str) → bool

Checks the TOC to see if a particular keyword exists there or not

tocprint(self: psi4.core.IO, arg0: int) → None

Print the table of contents for the given unit

tocwrite(self: psi4.core.IO, arg0: int) → None

Write the table of contents for passed file number

change_file_namespace(fileno: int, ns1: str, ns2: str) → None

Change file number from ns1 to ns2

close(self: psi4.core.IO, unit: int, keep: int) → None

Close unit. If keep == 0, will remove the file, else keep it

get_default_namespace() → str

Get the default namespace (for PREFIX.NAMESPACE.UNIT file numbering)

getpid(self: psi4.core.IO) → str

Lookup process id

open(self: psi4.core.IO, unit: int, status: int) → None

Open unit. Status can be PSIO_OPEN_OLD (if existing file is to be opened) or PSIO_OPEN_NEW if new file should be open

open_check(self: psi4.core.IO, unit: int) → int

Return 1 if unit is open

rehash(self: psi4.core.IO, unit: int) → None

Sync up the object to the file on disk by closing and opening the file, if necessary

set_default_namespace(ns: str) → None

Set the current namespace (for PREFIX.NAMESPACE.UNIT file numbering)

set_pid(self: psi4.core.IO, pid: str) → None

Set process id

shared_object() → psi4.core.IO

Return the global shared object

state(self: psi4.core.IO) → int

Return 1 if PSIO library is activated

tocclean(self: psi4.core.IO, unit: int, key: str) → None

Delete all TOC entries after the given key. If a blank key is given, the entire TOC will be wiped

tocentry_exists(self: psi4.core.IO, arg0: int, arg1: str) → bool

Checks the TOC to see if a particular keyword exists there or not

tocprint(self: psi4.core.IO, arg0: int) → None

Print the table of contents for the given unit

tocwrite(self: psi4.core.IO, arg0: int) → None

Write the table of contents for passed file number