file_list#

gwpy.io.utils.file_list(
flist: str | PathLike | NamedIO | GzipFile | _TemporaryFileWrapper | list[str | PathLike | NamedIO | GzipFile | _TemporaryFileWrapper] | tuple[str | PathLike | NamedIO | GzipFile | _TemporaryFileWrapper, ...],
) list[str][source]#

Parse a number of possible input types into a list of filepaths.

Parameters:
flistfile-like or list-like iterable

The input data container, normally just a single file path, or a list of paths, but can generally be any of the following

  • str representing a single file path (or comma-separated collection)

  • open file or GzipFile object

  • CacheEntry

  • str with .cache or .lcf extension

  • simple list or tuple of str paths

Returns:
fileslist

list of str file paths

Raises:
ValueError

if the input flist cannot be interpreted as any of the above inputs