file mode for high level funtion not useful

This commit is contained in:
Martin Diehl 2019-09-13 09:48:39 -07:00
parent 6f008c5d5f
commit f83a167414
1 changed files with 2 additions and 9 deletions

View File

@ -17,7 +17,7 @@ class DADF5():
# ------------------------------------------------------------------
def __init__(self,
filename,
mode = 'r',
mode = 'a',
):
"""
Opens an existing DADF5 file.
@ -26,15 +26,8 @@ class DADF5():
----------
filename : str
name of the DADF5 file to be openend.
mode : str, optional
filemode for opening, either 'r' or 'a'.
"""
if mode not in ['a','r']:
print('Invalid file access mode')
else:
with h5py.File(filename,mode):
pass
with h5py.File(filename,'r') as f: