|
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
|
|
list of str
|
|
list of lists of str
|
strip(data,
comments=True)
Remove all comment and empty lines from the file data structure. |
source code
|
|
str
|
|
|
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
|
|