(self, parent, modname, fqname)
return module
Import a single module.
Import a single module.
Import a single module .
def _import_one(self, parent, modname, fqname):
        "Import a single module."

        # has the module already been imported?
        try:
            return sys.modules[fqname]
        except KeyError:
            pass

        # load the module's code, or fetch the module itself
        result = self.get_code(parent, modname, fqname)
        if result is None:
            return None

        module = self._process_result(result, fqname)

        # insert the module into its parent
        if parent:
            setattr(parent, modname, module)
        return module
def _import_one ( self , parent , modname , fqname ) : # has the module already been imported? try : return sys . modules [ fqname ] except KeyError : pass # load the module's code, or fetch the module itself result = self . get_code ( parent , modname , fqname ) if result is None : return None module = self . _process_result ( result , fqname ) # insert the module into its parent if parent : setattr ( parent , modname , module ) return module