exa.util.utility module¶
Utilities¶
Commonly used functions (primarily for convenience and repetition reduction).
-
exa.util.utility.
datetime_header
(title='')[source]¶ Creates a simple header string containing the current date/time stamp delimited using “=”.
-
exa.util.utility.
mkp
(*args, mk=True)[source]¶ Generate a directory path, and create it if requested.
filepath = mkp('base', 'folder', 'file') dirpath = mkp('root', 'path', 'folder', mk=True)
- Parameters
args – File or directory path segments to be concatenated
mk (bool) – Make the directory (if it doesn’t exist)
- Returns
path (str) – File or directory path