diff options
author | Thomas White <taw@physics.org> | 2017-05-12 15:51:33 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2017-05-12 15:51:33 +0200 |
commit | 690666e32643302970b1f54bbaa0efe83aac7e86 (patch) | |
tree | cd4e9b32b46160649a1fa4f5c1786b1cbf614356 /scripts/peakogram-stream | |
parent | 4227f0b190b08ecc50a49875e86dbb9b14714bdd (diff) |
Make all Python scripts compatible with Python 2 and 3
It would be nice to upgrade completely to Python 3, but this may
create problems at SLAC because psana only supports Python 2 (Python 3
is available, but means that users have to jump through hoops to run
a simple CrystFEL script). None of our scripts do anything complicated,
so they can all be compatible with both so far.
If anyone adds a script which requires a particular version, make sure
to specify the version in the first line, consistent with PEP 394.
Diffstat (limited to 'scripts/peakogram-stream')
-rwxr-xr-x | scripts/peakogram-stream | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/scripts/peakogram-stream b/scripts/peakogram-stream index 209e7e95..1f67b39c 100755 --- a/scripts/peakogram-stream +++ b/scripts/peakogram-stream @@ -1,16 +1,14 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- - -# peakogram-stream # # Check a stream for saturation # -# Copyright © 2016 Deutsches Elektronen-Synchrotron DESY, +# Copyright © 2016-2017 Deutsches Elektronen-Synchrotron DESY, # a research centre of the Helmholtz Association. # Copyright © 2016 The Research Foundation for SUNY # # Authors: -# 2016 Thomas White <taw@physics.org> +# 2016-2017 Thomas White <taw@physics.org> # 2014-2016 Thomas Grant <tgrant@hwi.buffalo.edu> # # This file is part of CrystFEL. @@ -120,7 +118,7 @@ data = np.asarray(data,dtype=float) sys.stdout.write("\r%i peaks found" % n) sys.stdout.flush() -print "" +print("") x = data[:,0] y = data[:,1] |