Utils¶
Utility functions and classes.
Utility functions¶
setup_logging ([parameter_container, ...]) |
Setup logging configuration |
get_parameter_hash (params) |
Get unique hash string (md5) for given parameter dict |
get_class_inheritors (klass) |
Get all classes inherited from given class |
get_byte_string (num_bytes) |
Output number of bytes according to locale and with IEC binary prefixes |
argument_file_exists (filename) |
Argument file checker |
filelist_exists (filelist) |
Check that all file in the list exists |
posix_path (path) |
Converts path to POSIX format |
Timer¶
Timer () |
Timer class |
Timer.start () |
Start timer |
Timer.stop () |
Stop timer |
Timer.elapsed () |
Return elapsed time in seconds since timer was started |
Timer.get_string () |
Get elapsed time in a string format |
SuppressStdoutAndStderr¶
SuppressStdoutAndStderr () |
Context manager to suppress STDOUT and STDERR |
SimpleMathStringEvaluator¶
SimpleMathStringEvaluator () |
Simple math string evaluator |
SimpleMathStringEvaluator.eval (string) |
Evaluate math in the string |