|
delete(file_name,
dir=None,
fail=True)
Deleting the given file, taking into account missing compression
extensions. |
source code
|
|
(int, str)
|
|
list of lists of str
|
extract_data(file=None,
dir=None,
file_data=None,
sep=None)
Return all data in the file as a list of lines where each line is a
list of line elements. |
source code
|
|
str
|
|
str
|
|
|
|
|
io_streams_log(file_name=None,
dir=None,
verbosity=1)
Turn on logging, sending both STDOUT and STDERR streams to a file. |
source code
|
|
|
io_streams_tee(file_name=None,
dir=None,
compress_type=0,
verbosity=1)
Turn on teeing to split both STDOUT and STDERR streams and sending
second part to a file. |
source code
|
|
|
mkdir_nofail(dir=None,
verbosity=1)
Create the given directory, or exit without raising an error if the
directory exists. |
source code
|
|
file object
|
|
writable file object (if return_path, then a tuple of the writable
file and the full file path)
|
open_write_file(file_name=None,
dir=None,
force=False,
compress_type=0,
verbosity=1,
return_path=False)
Function for opening a file for writing and creating directories if
necessary. |
source code
|
|
str, list of [str, float], or list of [str, float, float]
|
read_spin_data(file=None,
dir=None,
file_data=None,
spin_id_col=None,
mol_name_col=None,
res_num_col=None,
res_name_col=None,
spin_num_col=None,
spin_name_col=None,
data_col=None,
error_col=None,
sep=None,
spin_id=None)
Generator function for reading the spin specific data from file. |
source code
|
|
list of lists of str
|
strip(data,
comments=True)
Remove all comment and empty lines from the file data structure. |
source code
|
|
|
test_binary(binary)
Function for testing that the binary string corresponds to a valid
executable file. |
source code
|
|
|
write_data(out=None,
headings=None,
data=None,
sep=None)
Write out a table of the data to the given file handle. |
source code
|
|
|
write_spin_data(file,
dir=None,
sep=None,
spin_ids=None,
mol_names=None,
res_nums=None,
res_names=None,
spin_nums=None,
spin_names=None,
force=False,
data=None,
data_name=None,
error=None,
error_name=None,
float_format=' %20.15g ' )
Generator function for reading the spin specific data from file. |
source code
|
|