-#This is required to workaround the python import bug where relative imports don't work if the module is imported as a main module.
-import os
-import sys
-numberOfLevelsDeepInPackageHierarchy = 0
-packageFilePath = os.path.abspath(__file__)
-for level in range( numberOfLevelsDeepInPackageHierarchy + 1 ):
- packageFilePath = os.path.dirname( packageFilePath )
-if packageFilePath not in sys.path:
- sys.path.insert( 0, packageFilePath )
-"""
-This page is in the table of contents.
-This is required to workaround the python import bug where relative imports don't work if the module is imported as a main module.
-"""
-import os
-import sys
-
-numberOfLevelsDeepInPackageHierarchy = 1
-packageFilePath = os.path.abspath(__file__)
-for level in range( numberOfLevelsDeepInPackageHierarchy + 1 ):
- packageFilePath = os.path.dirname( packageFilePath )
-if packageFilePath not in sys.path:
- sys.path.insert( 0, packageFilePath )
-#This is required to workaround the python import bug where relative imports don't work if the module is imported as a main module.
-import os
-import sys
-numberOfLevelsDeepInPackageHierarchy = 1
-packageFilePath = os.path.abspath(__file__)
-for level in range( numberOfLevelsDeepInPackageHierarchy + 1 ):
- packageFilePath = os.path.dirname( packageFilePath )
-if packageFilePath not in sys.path:
- sys.path.insert( 0, packageFilePath )
-"""
-This page is in the table of contents.
-This is required to workaround the python import bug where relative imports don't work if the module is imported as a main module.
-"""
-import os
-import sys
-
-numberOfLevelsDeepInPackageHierarchy = 1
-packageFilePath = os.path.abspath(__file__)
-for level in range( numberOfLevelsDeepInPackageHierarchy + 1 ):
- packageFilePath = os.path.dirname( packageFilePath )
-if packageFilePath not in sys.path:
- sys.path.insert( 0, packageFilePath )
-#This is required to workaround the python import bug where relative imports don't work if the module is imported as a main module.
-import os
-import sys
-numberOfLevelsDeepInPackageHierarchy = 2
-packageFilePath = os.path.abspath(__file__)
-for level in range( numberOfLevelsDeepInPackageHierarchy + 1 ):
- packageFilePath = os.path.dirname( packageFilePath )
-if packageFilePath not in sys.path:
- sys.path.insert( 0, packageFilePath )
-"""
-This page is in the table of contents.
-This is required to workaround the python import bug where relative imports don't work if the module is imported as a main module.
-"""
-import os
-import sys
-numberOfLevelsDeepInPackageHierarchy = 3
-packageFilePath = os.path.abspath(__file__)
-for level in range( numberOfLevelsDeepInPackageHierarchy + 1 ):
- packageFilePath = os.path.dirname( packageFilePath )
-if packageFilePath not in sys.path:
- sys.path.insert( 0, packageFilePath )
-"""
-This page is in the table of contents.
-This is required to workaround the python import bug where relative imports don't work if the module is imported as a main module.
-"""
-import os
-import sys
-numberOfLevelsDeepInPackageHierarchy = 2
-packageFilePath = os.path.abspath(__file__)
-for level in range( numberOfLevelsDeepInPackageHierarchy + 1 ):
- packageFilePath = os.path.dirname( packageFilePath )
-if packageFilePath not in sys.path:
- sys.path.insert( 0, packageFilePath )
-"""
-This page is in the table of contents.
-This is required to workaround the python import bug where relative imports don't work if the module is imported as a main module.
-"""
-import os
-import sys
-numberOfLevelsDeepInPackageHierarchy = 3
-packageFilePath = os.path.abspath(__file__)
-for level in range( numberOfLevelsDeepInPackageHierarchy + 1 ):
- packageFilePath = os.path.dirname( packageFilePath )
-if packageFilePath not in sys.path:
- sys.path.insert( 0, packageFilePath )
-#This is required to workaround the python import bug where relative imports don't work if the module is imported as a main module.
-import os
-import sys
-numberOfLevelsDeepInPackageHierarchy = 3
-packageFilePath = os.path.abspath(__file__)
-for level in range( numberOfLevelsDeepInPackageHierarchy + 1 ):
- packageFilePath = os.path.dirname( packageFilePath )
-if packageFilePath not in sys.path:
- sys.path.insert( 0, packageFilePath )
-#This is required to workaround the python import bug where relative imports don't work if the module is imported as a main module.
-import os
-import sys
-numberOfLevelsDeepInPackageHierarchy = 4
-packageFilePath = os.path.abspath(__file__)
-for level in range( numberOfLevelsDeepInPackageHierarchy + 1 ):
- packageFilePath = os.path.dirname( packageFilePath )
-if packageFilePath not in sys.path:
- sys.path.insert( 0, packageFilePath )
-"""
-This page is in the table of contents.
-This is required to workaround the python import bug where relative imports don't work if the module is imported as a main module.
-"""
-import os
-import sys
-numberOfLevelsDeepInPackageHierarchy = 3
-packageFilePath = os.path.abspath(__file__)
-for level in range( numberOfLevelsDeepInPackageHierarchy + 1 ):
- packageFilePath = os.path.dirname( packageFilePath )
-if packageFilePath not in sys.path:
- sys.path.insert( 0, packageFilePath )
-#This is required to workaround the python import bug where relative imports don't work if the module is imported as a main module.
-import os
-import sys
-numberOfLevelsDeepInPackageHierarchy = 4
-packageFilePath = os.path.abspath(__file__)
-for level in range( numberOfLevelsDeepInPackageHierarchy + 1 ):
- packageFilePath = os.path.dirname( packageFilePath )
-if packageFilePath not in sys.path:
- sys.path.insert( 0, packageFilePath )
-#This is required to workaround the python import bug where relative imports don't work if the module is imported as a main module.
-import os
-import sys
-numberOfLevelsDeepInPackageHierarchy = 4
-packageFilePath = os.path.abspath(__file__)
-for level in range( numberOfLevelsDeepInPackageHierarchy + 1 ):
- packageFilePath = os.path.dirname( packageFilePath )
-if packageFilePath not in sys.path:
- sys.path.insert( 0, packageFilePath )
-#This is required to workaround the python import bug where relative imports don't work if the module is imported as a main module.
-import os
-import sys
-numberOfLevelsDeepInPackageHierarchy = 4
-packageFilePath = os.path.abspath(__file__)
-for level in range( numberOfLevelsDeepInPackageHierarchy + 1 ):
- packageFilePath = os.path.dirname( packageFilePath )
-if packageFilePath not in sys.path:
- sys.path.insert( 0, packageFilePath )
-#This is required to workaround the python import bug where relative imports don't work if the module is imported as a main module.
-import os
-import sys
-numberOfLevelsDeepInPackageHierarchy = 3
-packageFilePath = os.path.abspath(__file__)
-for level in range( numberOfLevelsDeepInPackageHierarchy + 1 ):
- packageFilePath = os.path.dirname( packageFilePath )
-if packageFilePath not in sys.path:
- sys.path.insert( 0, packageFilePath )
-#This is required to workaround the python import bug where relative imports don't work if the module is imported as a main module.
-import os
-import sys
-numberOfLevelsDeepInPackageHierarchy = 3
-packageFilePath = os.path.abspath(__file__)
-for level in range( numberOfLevelsDeepInPackageHierarchy + 1 ):
- packageFilePath = os.path.dirname( packageFilePath )
-if packageFilePath not in sys.path:
- sys.path.insert( 0, packageFilePath )
-#This is required to workaround the python import bug where relative imports don't work if the module is imported as a main module.
-import os
-import sys
-numberOfLevelsDeepInPackageHierarchy = 3
-packageFilePath = os.path.abspath(__file__)
-for level in range( numberOfLevelsDeepInPackageHierarchy + 1 ):
- packageFilePath = os.path.dirname( packageFilePath )
-if packageFilePath not in sys.path:
- sys.path.insert( 0, packageFilePath )
-#This is required to workaround the python import bug where relative imports don't work if the module is imported as a main module.
-import os
-import sys
-numberOfLevelsDeepInPackageHierarchy = 3
-packageFilePath = os.path.abspath(__file__)
-for level in range( numberOfLevelsDeepInPackageHierarchy + 1 ):
- packageFilePath = os.path.dirname( packageFilePath )
-if packageFilePath not in sys.path:
- sys.path.insert( 0, packageFilePath )
-"""
-This page is in the table of contents.
-This is required to workaround the python import bug where relative imports don't work if the module is imported as a main module.
-"""
-import os
-import sys
-numberOfLevelsDeepInPackageHierarchy = 3
-packageFilePath = os.path.abspath(__file__)
-for level in range( numberOfLevelsDeepInPackageHierarchy + 1 ):
- packageFilePath = os.path.dirname( packageFilePath )
-if packageFilePath not in sys.path:
- sys.path.insert( 0, packageFilePath )
-#This is required to workaround the python import bug where relative imports don't work if the module is imported as a main module.
-import os
-import sys
-numberOfLevelsDeepInPackageHierarchy = 3
-packageFilePath = os.path.abspath(__file__)
-for level in range( numberOfLevelsDeepInPackageHierarchy + 1 ):
- packageFilePath = os.path.dirname( packageFilePath )
-if packageFilePath not in sys.path:
- sys.path.insert( 0, packageFilePath )
-#This is required to workaround the python import bug where relative imports don't work if the module is imported as a main module.
-import os
-import sys
-numberOfLevelsDeepInPackageHierarchy = 2
-packageFilePath = os.path.abspath(__file__)
-for level in range( numberOfLevelsDeepInPackageHierarchy + 1 ):
- packageFilePath = os.path.dirname( packageFilePath )
-if packageFilePath not in sys.path:
- sys.path.insert( 0, packageFilePath )
-#This is required to workaround the python import bug where relative imports don't work if the module is imported as a main module.
-import os
-import sys
-numberOfLevelsDeepInPackageHierarchy = 3
-packageFilePath = os.path.abspath(__file__)
-for level in range( numberOfLevelsDeepInPackageHierarchy + 1 ):
- packageFilePath = os.path.dirname( packageFilePath )
-if packageFilePath not in sys.path:
- sys.path.insert( 0, packageFilePath )
-#This is required to workaround the python import bug where relative imports don't work if the module is imported as a main module.
-import os
-import sys
-numberOfLevelsDeepInPackageHierarchy = 3
-packageFilePath = os.path.abspath(__file__)
-for level in range( numberOfLevelsDeepInPackageHierarchy + 1 ):
- packageFilePath = os.path.dirname( packageFilePath )
-if packageFilePath not in sys.path:
- sys.path.insert( 0, packageFilePath )
-#This is required to workaround the python import bug where relative imports don't work if the module is imported as a main module.
-import os
-import sys
-numberOfLevelsDeepInPackageHierarchy = 3
-packageFilePath = os.path.abspath(__file__)
-for level in range( numberOfLevelsDeepInPackageHierarchy + 1 ):
- packageFilePath = os.path.dirname( packageFilePath )
-if packageFilePath not in sys.path:
- sys.path.insert( 0, packageFilePath )
-#This is required to workaround the python import bug where relative imports don't work if the module is imported as a main module.
-import os
-import sys
-numberOfLevelsDeepInPackageHierarchy = 3
-packageFilePath = os.path.abspath(__file__)
-for level in range( numberOfLevelsDeepInPackageHierarchy + 1 ):
- packageFilePath = os.path.dirname( packageFilePath )
-if packageFilePath not in sys.path:
- sys.path.insert( 0, packageFilePath )
-#This is required to workaround the python import bug where relative imports don't work if the module is imported as a main module.
-import os
-import sys
-numberOfLevelsDeepInPackageHierarchy = 3
-packageFilePath = os.path.abspath(__file__)
-for level in range( numberOfLevelsDeepInPackageHierarchy + 1 ):
- packageFilePath = os.path.dirname( packageFilePath )
-if packageFilePath not in sys.path:
- sys.path.insert( 0, packageFilePath )
-#This is required to workaround the python import bug where relative imports don't work if the module is imported as a main module.
-import os
-import sys
-numberOfLevelsDeepInPackageHierarchy = 1
-packageFilePath = os.path.abspath(__file__)
-for level in range( numberOfLevelsDeepInPackageHierarchy + 1 ):
- packageFilePath = os.path.dirname( packageFilePath )
-if packageFilePath not in sys.path:
- sys.path.insert( 0, packageFilePath )
-#This is required to workaround the python import bug where relative imports don't work if the module is imported as a main module.
-import os
-import sys
-numberOfLevelsDeepInPackageHierarchy = 2
-packageFilePath = os.path.abspath(__file__)
-for level in range( numberOfLevelsDeepInPackageHierarchy + 1 ):
- packageFilePath = os.path.dirname( packageFilePath )
-if packageFilePath not in sys.path:
- sys.path.insert( 0, packageFilePath )
-#This is required to workaround the python import bug where relative imports don't work if the module is imported as a main module.
-import os
-import sys
-numberOfLevelsDeepInPackageHierarchy = 3
-packageFilePath = os.path.abspath(__file__)
-for level in range( numberOfLevelsDeepInPackageHierarchy + 1 ):
- packageFilePath = os.path.dirname( packageFilePath )
-if packageFilePath not in sys.path:
- sys.path.insert( 0, packageFilePath )
-#This is required to workaround the python import bug where relative imports don't work if the module is imported as a main module.
-import os
-import sys
-numberOfLevelsDeepInPackageHierarchy = 3
-packageFilePath = os.path.abspath(__file__)
-for level in range( numberOfLevelsDeepInPackageHierarchy + 1 ):
- packageFilePath = os.path.dirname( packageFilePath )
-if packageFilePath not in sys.path:
- sys.path.insert( 0, packageFilePath )
-#This is required to workaround the python import bug where relative imports don't work if the module is imported as a main module.
-import os
-import sys
-numberOfLevelsDeepInPackageHierarchy = 4
-packageFilePath = os.path.abspath(__file__)
-for level in range( numberOfLevelsDeepInPackageHierarchy + 1 ):
- packageFilePath = os.path.dirname( packageFilePath )
-if packageFilePath not in sys.path:
- sys.path.insert( 0, packageFilePath )
-#This is required to workaround the python import bug where relative imports don't work if the module is imported as a main module.
-import os
-import sys
-numberOfLevelsDeepInPackageHierarchy = 5
-packageFilePath = os.path.abspath(__file__)
-for level in range( numberOfLevelsDeepInPackageHierarchy + 1 ):
- packageFilePath = os.path.dirname( packageFilePath )
-if packageFilePath not in sys.path:
- sys.path.insert( 0, packageFilePath )
-#This is required to workaround the python import bug where relative imports don't work if the module is imported as a main module.
-import os
-import sys
-numberOfLevelsDeepInPackageHierarchy = 3
-packageFilePath = os.path.abspath(__file__)
-for level in range( numberOfLevelsDeepInPackageHierarchy + 1 ):
- packageFilePath = os.path.dirname( packageFilePath )
-if packageFilePath not in sys.path:
- sys.path.insert( 0, packageFilePath )
-#This is required to workaround the python import bug where relative imports don't work if the module is imported as a main module.
-import os
-import sys
-numberOfLevelsDeepInPackageHierarchy = 3
-packageFilePath = os.path.abspath(__file__)
-for level in range( numberOfLevelsDeepInPackageHierarchy + 1 ):
- packageFilePath = os.path.dirname( packageFilePath )
-if packageFilePath not in sys.path:
- sys.path.insert( 0, packageFilePath )
-#This is required to workaround the python import bug where relative imports don't work if the module is imported as a main module.
-import os
-import sys
-numberOfLevelsDeepInPackageHierarchy = 2
-packageFilePath = os.path.abspath(__file__)
-for level in range( numberOfLevelsDeepInPackageHierarchy + 1 ):
- packageFilePath = os.path.dirname( packageFilePath )
-if packageFilePath not in sys.path:
- sys.path.insert( 0, packageFilePath )
-import os
-import sys
-
-numberOfLevelsDeepInPackageHierarchy = 1
-packageFilePath = os.path.abspath(__file__)
-for level in range( numberOfLevelsDeepInPackageHierarchy + 1 ):
- packageFilePath = os.path.dirname( packageFilePath )
-if packageFilePath not in sys.path:
- sys.path.insert( 0, packageFilePath )
-import os
-import sys
-
-numberOfLevelsDeepInPackageHierarchy = 1
-packageFilePath = os.path.abspath(__file__)
-for level in range( numberOfLevelsDeepInPackageHierarchy + 1 ):
- packageFilePath = os.path.dirname( packageFilePath )
-if packageFilePath not in sys.path:
- sys.path.insert( 0, packageFilePath )
-from __future__ import absolute_import
-import __init__
-
import sys, os, subprocess
def hasExporer():
-from __future__ import absolute_import
-import __init__
-
import sys
import math
import re
import os
-from util import util3d
-from util import profile
+import util3d
+import profile
class gcodePath(object):
def __init__(self, newType, pathType, layerThickness, startPoint):
-from __future__ import absolute_import
-import __init__
-
import sys, math, re, os, struct, time
-from util import util3d
+import util3d
class meshFace(object):
def __init__(self, v0, v1, v2):
globalPreferenceParser = None\r
\r
def getPreferencePath():\r
- return os.path.normpath(os.path.join(os.path.dirname(os.path.abspath(__file__)), "../preferences.ini"))\r
+ basePath = os.path.normpath(os.path.join(os.path.dirname(os.path.abspath(__file__)), ".."))\r
+ if os.path.basename(basePath) == 'library.zip':\r
+ basePath = os.path.normpath(os.path.join(basePath, ".."))\r
+ return os.path.normpath(os.path.join(basePath, "preferences.ini"))\r
\r
def getPreferenceFloat(name):\r
try:\r
import platform, os, subprocess, sys
-from cura_sf.skeinforge_application.skeinforge_utilities import skeinforge_craft
+cura_sf_path = os.path.normpath(os.path.join(os.path.dirname(os.path.abspath(__file__)), "../cura_sf/"))
+if cura_sf_path not in sys.path:
+ sys.path.append(cura_sf_path)
+from skeinforge_application.skeinforge_utilities import skeinforge_craft
+
from util import profile
#How long does each step take compared to the others. This is used to make a better scaled progress bar, and guess time left.
"Return the path to the pypy executable if we can find it. Else return False"
if platform.system() == "Windows":
exeName = "pypy.exe"
- pypyExe = os.path.normpath(os.path.join(os.path.dirname(os.path.abspath(__file__)), "../../pypy/pypy.exe"));
+ pypyExe = os.path.normpath(os.path.join(os.path.dirname(os.path.abspath(__file__)), "../../pypy/pypy.exe"))
else:
exeName = "pypy"
- pypyExe = os.path.normpath(os.path.join(os.path.dirname(os.path.abspath(__file__)), "../../pypy/bin/pypy"));
+ pypyExe = os.path.normpath(os.path.join(os.path.dirname(os.path.abspath(__file__)), "../../pypy/bin/pypy"))
if os.path.exists(pypyExe):
return pypyExe
-from __future__ import absolute_import
-import __init__
-
import sys, math, re, os, struct, time
-from util import util3d
-from util import mesh
+import util3d
+import mesh
class stlModel(mesh.mesh):
def __init__(self):
-
import math
class Vector3(object):
-from __future__ import absolute_import
-import __init__
-
import os
def getVersion():