Home | History | Annotate | Download | only in python2.7

Lines Matching refs:parent

92         parent = self._determine_import_context(globals)
94 # if there is a parent, then its importer should manage this import
95 if parent:
96 module = parent.__importer__._do_import(parent, parts, fromlist)
171 parent = sys.modules[parent_fqname]
172 assert globals is parent.__dict__
173 return parent
184 parent = sys.modules[parent_fqname]
185 assert parent.__name__ == parent_fqname
186 return parent
263 def _import_one(self, parent, modname, fqname):
273 result = self.get_code(parent, modname, fqname)
279 # insert the module into its parent
280 if parent:
281 setattr(parent, modname, module)
351 def _do_import(self, parent, parts, fromlist):
352 """Attempt to import the module relative to parent.
355 imported the parent module.
358 top_fqname = parent.__name__ + '.' + top_name
359 top_module = self._import_one(parent, top_name, top_fqname)
361 # this importer and parent could not find the module (relatively)
370 def get_code(self, parent, modname, fqname):
373 parent specifies a parent module to define a context for importing. It
376 modname specifies a single module (not dotted) within the parent.
381 If there is no parent, then modname==fqname.
505 def get_code(self, parent, modname, fqname):
506 if parent:
542 def get_code(self, parent, modname, fqname):
543 # This importer is never used with an empty parent. Its existence is
547 assert parent
549 for submodule_path in parent.__path__:
553 return self._import_pathname(_os_path_join(parent.__pkgdir__, modname),