예제 #1
0
 def load_module(self, fullname):
     module = ImpLoader.load_module(self, fullname)
     if hasattr(module, '__api__'):
         sys.modules[fullname] = _RamModule(module, module.__api__())
     else:
         sys.modules[fullname] = module
     return sys.modules[fullname]
예제 #2
0
 def load_module(self, fullname):
     module = ImpLoader.load_module(self, fullname)
     if not isinstance(module, UnitLibModule):
         if not IsSame(self.fullname):
             config = ram.query(self.fullname)
         else:
             config = None
         module = UnitLibModule(module, config)
     if not hasattr(module, '__path__'):
         setattr(module, '__path__', [])
     sys.modules[fullname] = module
     return module