open_hdf5_file

function of dascore.utils.hdf5 source

open_hdf5_file(
    path_or_handler: pathlib.Path | str | tables.file.File[Path, str, File] ,
    mode: Literal[‘r’, ‘w’, ‘a’] = r,
)-> ‘tables.File’

A helper function for getting a tables.file.File object.

If a file reference (str or Path) is passed this context manager will close the file when it exists.

Parameters

Parameter Description
path_or_handler The input
mode The mode in which to open the file.

Raises

InvalidBuffer if a writable mode is requested from a read only handler.