Back to index

python3.2  3.2.2
Public Member Functions | Public Attributes | Static Public Attributes | Private Member Functions
test.test_importhooks.PathImporter Class Reference
Inheritance diagram for test.test_importhooks.PathImporter:
Inheritance graph
Collaboration diagram for test.test_importhooks.PathImporter:
Collaboration graph

List of all members.

Public Member Functions

def find_module
def load_module

Public Attributes


Static Public Attributes

dictionary modules

Private Member Functions

def _get__path__

Detailed Description

Definition at line 83 of file

Member Function Documentation

Reimplemented from test.test_importhooks.TestImporter.

Definition at line 84 of file

00085     def _get__path__(self):
00086         return [self.path]

def test.test_importhooks.TestImporter.find_module (   self,
  path = None 
) [inherited]

Definition at line 62 of file

00063     def find_module(self, fullname, path=None):
00064         if fullname in self.modules:
00065             return self
00066         else:
00067             return None

def test.test_importhooks.TestImporter.load_module (   self,
) [inherited]

Definition at line 68 of file

00069     def load_module(self, fullname):
00070         ispkg, code = self.modules[fullname]
00071         mod = sys.modules.setdefault(fullname,imp.new_module(fullname))
00072         mod.__file__ = "<%s>" % self.__class__.__name__
00073         mod.__loader__ = self
00074         if ispkg:
00075             mod.__path__ = self._get__path__()
00076         exec(code, mod.__dict__)
00077         return mod

Here is the call graph for this function:

Member Data Documentation

Initial value:
        "hooktestmodule": (False, test_co),
        "hooktestpackage": (True, test_co),
        "hooktestpackage.sub": (True, test_co),
        "hooktestpackage.sub.subber": (True, test_co),
        "hooktestpackage.oldabs": (False, test2_oldabs_co),
        "hooktestpackage.newabs": (False, test2_newabs_co),
        "hooktestpackage.newrel": (False, test2_newrel_co),
        "hooktestpackage.sub.subber.subest": (True, test2_deeprel_co),
        "hooktestpackage.futrel": (False, test2_futrel_co),
        "sub": (False, test_co),
        "reloadmodule": (False, test_co),

Definition at line 38 of file

Definition at line 57 of file

The documentation for this class was generated from the following file: