Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

More fixes for 3.2 vs 2.x

 * The relative import only worked on 2.7 and 3.2. Replaced
   with absolute import that seems to work for 2.5 onwards
 * The pickle file needs to be opened in binary mode.
  • Loading branch information...
commit a94939a96a643944520c1da51493825285ecd92c 1 parent d535c88
@timj timj authored
Showing with 5 additions and 2 deletions.
  1. +5 −2 lib/__init__.py
View
7 lib/__init__.py
@@ -18,10 +18,13 @@
"""
import pickle
import os
-from .slalib import slalib
+
+# Relative path: from .slalib import *
+# works for 2.6 and above but we use this form to work on 2.5
+from pyslalib import slalib
# A dictionary with functions as keys and comments in SLALIB
# Fortran files as value strings. Use
dir_name = os.path.dirname(slalib.__file__)
-f = open(os.path.join(dir_name,"docstring_pickle.pkl"), "r")
+f = open(os.path.join(dir_name,"docstring_pickle.pkl"), "rb")
sladoc = pickle.load(f)
Please sign in to comment.
Something went wrong with that request. Please try again.