createAnchor¶
Creates a timestamped output directory for the logs and file outputs of the work script.
Configurations¶
-
default_timestamp
¶ Default timestamp to be used when creating the output directory
“%Y_%m_%d - %H-%M-%S”
Functions¶
-
createAnchor
(base_path, name_format, move_inside=False)¶ Creates an anchor directory for the running script’s outputs
Parameters: - base_path – (str): basic FS path in which the anchor directory will be created
- name_format – (str): name format for the created anchor, expects an “%s” for the generated timestamp
- move_inside – (bool, optional): True iff should move the current directory to the anchor (False by default)
Returns: absolute path to the created anchor directory
Usage Examples¶
- Creating a default anchor at the current directory, named “Output 2019_03_14 - 19-44-08”:
createAnchor(".", "Output %s", move_inside=True)