aboutsummaryrefslogtreecommitdiff
path: root/scripts/Rsplit_surface.py
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2017-05-12 15:51:33 +0200
committerThomas White <taw@physics.org>2017-05-12 15:51:33 +0200
commit690666e32643302970b1f54bbaa0efe83aac7e86 (patch)
treecd4e9b32b46160649a1fa4f5c1786b1cbf614356 /scripts/Rsplit_surface.py
parent4227f0b190b08ecc50a49875e86dbb9b14714bdd (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/Rsplit_surface.py')
-rw-r--r--scripts/Rsplit_surface.py16
1 files changed, 7 insertions, 9 deletions
diff --git a/scripts/Rsplit_surface.py b/scripts/Rsplit_surface.py
index ca68a92e..63a72cd8 100644
--- a/scripts/Rsplit_surface.py
+++ b/scripts/Rsplit_surface.py
@@ -1,13 +1,5 @@
#!/usr/bin/python
-# coding=utf-8
-
-from __future__ import division
-from array import array
-from numpy import *
-
-import matplotlib
-
-# Rsplit_surface.py
+# -*- coding: utf-8 -*-
#
# Plot Rsplit as a contour map
#
@@ -32,6 +24,12 @@ import matplotlib
# along with CrystFEL. If not, see <http://www.gnu.org/licenses/>.
+from __future__ import division
+from array import array
+from numpy import *
+
+import matplotlib
+
"""there could be problems with dependencies, in this case, """
#matplotlib.use('PS')