Back to index

python3.2  3.2.2
Public Member Functions | Public Attributes
test.test_importhooks.ImpWrapper Class Reference

List of all members.

Public Member Functions

def __init__
def find_module

Public Attributes

 path

Detailed Description

Definition at line 102 of file test_importhooks.py.


Constructor & Destructor Documentation

def test.test_importhooks.ImpWrapper.__init__ (   self,
  path = None 
)

Definition at line 104 of file test_importhooks.py.

00104 
00105     def __init__(self, path=None):
00106         if path is not None and not os.path.isdir(path):
00107             raise ImportError
00108         self.path = path

Here is the caller graph for this function:


Member Function Documentation

def test.test_importhooks.ImpWrapper.find_module (   self,
  fullname,
  path = None 
)

Definition at line 109 of file test_importhooks.py.

00109 
00110     def find_module(self, fullname, path=None):
00111         subname = fullname.split(".")[-1]
00112         if subname != fullname and self.path is None:
00113             return None
00114         if self.path is None:
00115             path = None
00116         else:
00117             path = [self.path]
00118         try:
00119             file, filename, stuff = imp.find_module(subname, path)
00120         except ImportError:
00121             return None
00122         return ImpLoader(file, filename, stuff)
00123 


Member Data Documentation

Definition at line 107 of file test_importhooks.py.


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