Commits

AJ R committed a337177

cx_freeze ImportError fixed

Comments (0)

Files changed (2)

savReaderWriter/__init__.py

 segfaults = False
 
 import os
+import sys
 
 try:
     import psyco
 __author__ = "Albert-Jan Roskam" + " " + "@".join(["fomcl", "yahoo.com"])
 
 if getattr(sys, 'frozen', False):
-    # The application is frozen by cx_freeze, py2exe or something
+    # The application is frozen by cx_freeze
     __version__ = open(os.path.join(os.path.dirname(sys.executable),
                         "savReaderWriter", "VERSION")).read().strip()
 else:

savReaderWriter/generic.py

         # I/O modules, compared to hardcoding the names
         debug = False
         if getattr(sys, 'frozen', False):
-            # The application is frozen by cx_freeze, py2exe or something
-            path = os.path.join(os.path.dirname(sys.executable), "savReaderWriter", "spssio", folder)
+            # The application is frozen by cx_freeze
+            path = os.path.dirname(sys.executable)
+            path = os.path.join(path, "savReaderWriter", "spssio", folder)
         else:
             path = os.path.join(os.path.dirname(__file__), "spssio", folder)
         libs = sorted(os.listdir(path))