Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas-Karl Pietrowski <thopiekar@googlemail.com>2016-04-21 18:34:33 +0300
committerThomas-Karl Pietrowski <thopiekar@googlemail.com>2016-04-21 18:34:33 +0300
commit61069e9a71c57a65eded4d9a9dc1213fd92e1d88 (patch)
tree9cbee5be72454e16e7ce9a9d8c0bd764356f5271 /cura_app.py
parent286673e812dc67a7311e6beffa146981ae2afb6a (diff)
Making the fix working with a list of PATHS seperated by os.pathsep
Needs testing but should work. (fingers crossed)
Diffstat (limited to 'cura_app.py')
-rwxr-xr-xcura_app.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/cura_app.py b/cura_app.py
index 060abd5520..6c20910907 100755
--- a/cura_app.py
+++ b/cura_app.py
@@ -14,7 +14,13 @@ import sys
# the system instead of the one provided with Cura, which causes
# incompatibility issues with libArcus
if "PYTHONPATH" in os.environ.keys(): # If PYTHONPATH is used
- PYTHONPATH_real = os.path.realpath(os.environ["PYTHONPATH"])
+ PYTHONPATH = os.environ["PYTHONPATH"]
+ PYTHONPATH = PYTHONPATH.split(os.pathsep)
+ PYTHONPATH_real = os.path.realpath(PYTHONPATH[0])
+ PYTHONPATH = PYTHONPATH[1:]
+ while PYTHONPATH:
+ PYTHONPATH_real += ":%s" %(os.path.realpath(PYTHONPATH[0]))
+ PYTHONPATH = PYTHONPATH[1:]
if sys.path[1] != PYTHONPATH_real: # .. check whether PYTHONPATH is placed incorrectly.
sys.path.remove(PYTHONPATH_real) # If so, remove that element..
sys.path.insert(1, PYTHONPATH_real) # and add it at the correct place again.