tlpipe.utils.path_util.output_path¶
-
tlpipe.utils.path_util.
output_path
(path, relative=True, mkdir=True, iteration=None)[source]¶ Normalize the given output path.
This function supposes that path is relative to os.environ[‘TL_OUTPUT’] if relative is True.
Parameters: - path (string or list of strings) – The output path.
- relative (bool, optional) – The path is relative to os.environ[‘TL_OUTPUT’] if True. Default is True.
- mkdir (bool, optional) – Make the path directory if True. Default is True.
- iteration (None or integer, optional) – The iteration number. If it is not None, it will be inserted into the path before the path’s basename. Default is None.
Returns: norm_path – The normalized absolute output path.
Return type: string or list of strings