# Make sure _omnipy submodules are in sys.modules, and have not been # damaged. This can happen if someone has messed with sys.modules, or # the interpreter has been stopped and restarted. reinit = 0 for k, v in _omnipy.__dict__.items(): if k[-5:] == "_func" and isinstance(v, types.ModuleType): sub = "_omnipy." + k if not sys.modules.has_key(sub): reinit = 1 sys.modules[sub] = v del sub del k, v if reinit: _omnipy.ensureInit() del reinit # Add path to COS stubs if need be _cospath = os.path.join(os.path.dirname(__file__), "COS") if _cospath not in sys.path: sys.path.append(_cospath) del _cospath # Public functions def coreVersion(): """coreVersion()
# Make sure _omnipy submodules are in sys.modules, and have not been # damaged. This can happen if someone has messed with sys.modules, or # the interpreter has been stopped and restarted. reinit = 0 for k, v in list(_omnipy.__dict__.items()): if k[-5:] == "_func" and isinstance(v, types.ModuleType): sub = "_omnipy." + k if sub not in sys.modules: reinit = 1 sys.modules[sub] = v del sub del k, v if reinit: _omnipy.ensureInit() del reinit # Add path to COS stubs if need be _cospath = os.path.join(os.path.dirname(__file__), "COS") if _cospath not in sys.path: sys.path.append(_cospath) del _cospath # Public functions def coreVersion(): """coreVersion()