diff options
author | Mitchell Stokes <mogurijin@gmail.com> | 2011-07-29 10:32:30 +0400 |
---|---|---|
committer | Mitchell Stokes <mogurijin@gmail.com> | 2011-07-29 10:32:30 +0400 |
commit | b46d8955509e805f06b76a6fd800ecb4edee113b (patch) | |
tree | 7ed0b1a3b5d04ab48d3e9062ff02ce54961ecb06 /source/tests/bl_load_py_modules.py | |
parent | 6960127d2609620d52620539388ada5cb466bab2 (diff) | |
parent | 26589497529ca3c8da85391d4976d286a371e258 (diff) |
Merging r36529-38806bge_components
Diffstat (limited to 'source/tests/bl_load_py_modules.py')
-rw-r--r-- | source/tests/bl_load_py_modules.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source/tests/bl_load_py_modules.py b/source/tests/bl_load_py_modules.py index 5a65578d8d3..a88edd5f1fe 100644 --- a/source/tests/bl_load_py_modules.py +++ b/source/tests/bl_load_py_modules.py @@ -65,6 +65,10 @@ def load_modules(): # paths blender stores scripts in. paths = bpy.utils.script_paths() + print("Paths:") + for script_path in paths: + print("\t'%s'" % script_path) + # # find all sys.path we added for script_path in paths: @@ -74,11 +78,18 @@ def load_modules(): # # collect modules from our paths. + module_names = set() for mod_dir in module_paths: # print("mod_dir", mod_dir) for mod, mod_full in bpy.path.module_names(mod_dir): + if mod in module_names: + raise Exception("Module found twice %r" % mod) + modules.append(__import__(mod)) + module_names.add(mod) + del module_names + # # now submodules for m in modules: |