tlpipe.utils.path_util.input_path

tlpipe.utils.path_util.input_path(path, iteration=None)[source]

Normalize the given input path.

This function supposes that path is a absolute path if it starts with /, else it is relative to os.environ[‘TL_OUTPUT’].

Parameters:
  • path (string or list of strings) – The input path.
  • 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 input path.

Return type:

string or list of strings