aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2018-09-02 22:36:49 +0200
committerThomas White <taw@physics.org>2018-09-02 22:36:49 +0200
commite05c4b9d3f69c86052617a009abcd6573a778e45 (patch)
tree2250d9958f9ee349ea2443d2598bd92446225448 /scripts
parent9a87658c6a22f910f196038e1ea910c634719d76 (diff)
ave-resolution: Accept - for stdin
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/ave-resolution6
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/ave-resolution b/scripts/ave-resolution
index 69c21195..370b3889 100755
--- a/scripts/ave-resolution
+++ b/scripts/ave-resolution
@@ -14,7 +14,11 @@ import sys
import numpy
import matplotlib.pyplot as plt
-f = open(sys.argv[1])
+if sys.argv[1] == '-':
+ f = sys.stdin
+else:
+ f = open(sys.argv[1])
+
a = []
while True: