Skip to content


Subversion checkout URL

You can clone with
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...
1 parent d535c88 commit a94939a96a643944520c1da51493825285ecd92c @timj timj committed
Showing with 5 additions and 2 deletions.
  1. +5 −2 lib/
7 lib/
@@ -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)

0 comments on commit a94939a

Please sign in to comment.
Something went wrong with that request. Please try again.