I/O Utilities (gwpy.io.utils)#

Utilities for unified input/output.

Functions#

file_list(flist)

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

file_path(fobj)

Determine the path of a file.

gopen(name, *args, **kwargs)

Open a file handling optional gzipping.

with_open(-> Callable[P, T])

Decorate a function to ensure the chosen argument is an open file.

Variables#

FILE_LIKE

Tuple of file-like types

FileLike

Type alias for file-like objects

NamedFileLike

Type alias for file-like objects with a name attribute

NamedReadable

Type alias for named readable objects (path or named file-like)

NamedWritable

Type alias for named writable objects (path or named file-like)

Readable

Type alias for readable objects (path or file-like)

Writable

Type alias for writable objects (path or file-like)