common¶
Double-precision floating-point number type, compatible with Python |
|
|
Add sections and key-val paris in info to config. |
|
Assert arg to be a sequence. |
|
Use this instead of assert cond, string. |
|
Convenient shell backtick replacement. |
|
Backup (copy) src to <src><prefix><num>, where <num> is an integer starting at 0 which is incremented until there is no destination with that name. |
|
Load object written by |
|
Convert a dict to a class. |
|
Nicer than simply __repr__. |
|
Convert strings representing numbers to Python floats using float(). |
|
Open file with name fn, return open(fn).read(). |
|
Open file with name fn, return open(fn).readlines(). |
|
Replace placeholders in file fn. |
|
Write string txt to file with name fn. |
|
Set values of arr to zero where abs(arr) <= eps. |
|
Same as iflatten(), but returns a list. |
|
|
|
Similar to Python's repr(), but return floats formated with ffmt if var is a float. |
|
Complete path: absolute path + $HOME expansion. |
|
|
|
Try to get the name attribute from file-like objects. |
|
Flatten a sequence. |
|
Test if seq is some kind of sequence, based on calling iter(seq), i.e. if the object is iterable. |
|
Same as os.makedirs() but silently skips empty paths. |
Helper for subprocess.Popen(). |
|
|
Pop all items from lst and return a shorter copy of lst. |
|
|
|
(1,2,3) -> "1 2 3" |
|
"1 2 3" -> [func('1'), func('2'), func('3')] |
|
|
|
Convert array arr to nice string representation for printing. |
|
Fire up shell commamd line call. |
|
Replace placeholders dct.keys() with string values dct.values() in a text string. |
|
Convert val to boolean value True or False. |
|
A simple wrapper around numpy.s_() taking strings as argument. |
|
(1,2,3) -> "1 2 3" |