diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-08-03 14:36:22 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-08-03 14:36:22 +0300 |
commit | 606fbde1c3968d2db1b7beb954a778a4997905c9 (patch) | |
tree | fc7904f5bba1195cd27d66f46f22e72573537332 /measureit/__init__.py | |
parent | 1b9a94b5f9380a12123f1def08db5a4110b54c9c (diff) |
Avoid modification of python system paths
This isn't a proper way to solve the import problem, use relative import instead.
Diffstat (limited to 'measureit/__init__.py')
-rw-r--r-- | measureit/__init__.py | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/measureit/__init__.py b/measureit/__init__.py index 3401a6a6..8e7841fb 100644 --- a/measureit/__init__.py +++ b/measureit/__init__.py @@ -40,18 +40,6 @@ import sys import os # ---------------------------------------------- -# Add to Phyton path (once only) -# ---------------------------------------------- -path = sys.path -flag = False -for item in path: - if "measureit" in item: - flag = True -if flag is False: - sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'measureit')) - print("measureit: added to phytonpath") - -# ---------------------------------------------- # Import modules # ---------------------------------------------- if "bpy" in locals(): @@ -60,7 +48,7 @@ if "bpy" in locals(): imp.reload(measureit_main) print("measureit: Reloaded multifiles") else: - import measureit_main + from . import measureit_main print("measureit: Imported multifiles") |