aboutsummaryrefslogtreecommitdiff
path: root/scripts/display-hdf5
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2020-09-10 16:19:08 +0200
committerThomas White <taw@physics.org>2020-09-10 16:19:08 +0200
commitf4dfbda344028d0ce13806d652b6fbef56da79c7 (patch)
tree40315c7900b1485b93d0e1af1369f922c47eacc0 /scripts/display-hdf5
parent8533b4666bb7758a2f07d0715aba49ddaebe8fc9 (diff)
scripts/display-hdf5: Open file in read-only mode
Diffstat (limited to 'scripts/display-hdf5')
-rwxr-xr-xscripts/display-hdf52
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/display-hdf5 b/scripts/display-hdf5
index c203df20..f65da9e4 100755
--- a/scripts/display-hdf5
+++ b/scripts/display-hdf5
@@ -8,7 +8,7 @@ if len(sys.argv) != 3:
print("Syntax: {} file.h5 /data/location\n".format(sys.argv[0]))
sys.exit(1)
-fh = h5py.File(sys.argv[1])
+fh = h5py.File(sys.argv[1], 'r')
dataset = fh[sys.argv[2]]
show = plt.figure()