# shared_imported, patterns, register_name, register_pattern
# will be shared by all Python sub interpretors
-# On Win32, don't use omnipatch with omniOrb 4.0.7 so far
-if not sys.platform == "win32":
- from omnipatch import shared_imported
- import_hook.shared_imported=shared_imported
-else:
- shared_imported=import_hook.shared_imported
+shared_imported=import_hook.shared_imported
from import_hook import patterns
from import_hook import register_name
# Import all *_shared_modules in the path and store them in list_modules
path=salome_path.split(":")
+
+print path
for rep in path:
# Import all *_shared_modules in rep
- for f in glob.glob(os.path.join(rep,"lib","python"+sys.version[:3],"site-packages","salome","shared_modules","*_shared_modules.py")):
+ glob_path = os.path.join(rep,"lib","python"+sys.version[:3],"site-packages","salome","shared_modules","*_shared_modules.py")
+ if sys.platform == "win32":
+ glob_path = os.path.join(rep,"win32","python","shared_modules","*_shared_modules.py")
+ for f in glob.glob(glob_path):
try:
name=os.path.splitext(os.path.basename(f))[0]
register_name(name)
+ #print name + " REGISTERED"
m=__import__(name)
+ #print name + " IMPORTED"
list_modules.append(m)
except:
+ print "Exception during register and import shared module"
pass
#