inspect_file_attrs¶
-
support.hdf5_util.
inspect_file_attrs
(f_path_or_f_obj)¶ List out the attributes of some HDF5 file object. If a path is provided, then it will open the file in read mode.
Examples:
import h5py from support.hdf5_util import inspect_file_attrs file_path = "example.hdf5" with h5py.File(file_path, "w") as f: f.attrs["first_name"] = "dill" f.attrs["last_name"] = "pickle" f.attrs["age"] = 0.1 inspect_file_attrs(file_path).close()
This will output the following:
first_name: "dill" last_name: "pickle" age: 0.1