diff options
author | Thomas White <taw@physics.org> | 2018-09-02 22:36:49 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2018-09-02 22:36:49 +0200 |
commit | e05c4b9d3f69c86052617a009abcd6573a778e45 (patch) | |
tree | 2250d9958f9ee349ea2443d2598bd92446225448 /scripts/ave-resolution | |
parent | 9a87658c6a22f910f196038e1ea910c634719d76 (diff) |
ave-resolution: Accept - for stdin
Diffstat (limited to 'scripts/ave-resolution')
-rwxr-xr-x | scripts/ave-resolution | 6 |
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: |