diff options
author | Thomas White <taw@physics.org> | 2017-11-14 15:15:23 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2017-11-14 15:15:34 +0100 |
commit | d2d7bec98af6e9c207a4362eefbdb6fdd23e9c54 (patch) | |
tree | 6897f9a3ccb198b02fdb902d1230bb37e20b7837 | |
parent | 69e6dcc10d7ac96ba71b35a2908197a9a60ac20c (diff) |
scripts/peakogram-stream: Handle "-" for input
-rwxr-xr-x | scripts/peakogram-stream | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/peakogram-stream b/scripts/peakogram-stream index a17670ce..22ce4680 100755 --- a/scripts/peakogram-stream +++ b/scripts/peakogram-stream @@ -79,7 +79,12 @@ n=0 in_list = 0 cell = [] -with open(args.i) as f: +if args.i == "-": + f = sys.stdin +else: + f = open(args.i) + +if f: for line in f: if line.find("Cell parameters") != -1: |