In h5py, I use the file id to determine if a file is open or not. So defining this function:
def isopen(f):
if f:
print('File is open')
else:
print('File is closed')
I get the following with a local HDF5 file.
>>> a=h5.File('chopper.nxs')
>>> isopen(a)
File is open
>>> a.close()
>>> isopen(a)
File is closed
With h5pyd, I get the following:
>>> a=h5d.File('chopper.exfac', mode='r', endpoint='http://some.server:5000')
>>> isopen(a)
File is open
>>> a.close()
>>> isopen(a)
File is open
I can use the File id.uuid property instead, since that is set to 0 when the file is closed, but the current behavior is not fully compatible with h5py.
In h5py, I use the file id to determine if a file is open or not. So defining this function:
I get the following with a local HDF5 file.
With h5pyd, I get the following:
I can use the File id.uuid property instead, since that is set to 0 when the file is closed, but the current behavior is not fully compatible with h5py.