From f4dfbda344028d0ce13806d652b6fbef56da79c7 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Thu, 10 Sep 2020 16:19:08 +0200 Subject: scripts/display-hdf5: Open file in read-only mode --- scripts/display-hdf5 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts') 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() -- cgit v1.2.3