Back to index

python3.2  3.2.2
Public Member Functions | Private Attributes
importlib._bootstrap._ExtensionFileLoader Class Reference

List of all members.

Public Member Functions

def __init__
def load_module
def is_package
def get_code
def get_source

Private Attributes

 _name
 _path

Detailed Description

Loader for extension modules.

The constructor is designed to work with FileFinder.

Definition at line 528 of file _bootstrap.py.


Constructor & Destructor Documentation

def importlib._bootstrap._ExtensionFileLoader.__init__ (   self,
  name,
  path 
)
Initialize the loader.

If is_pkg is True then an exception is raised as extension modules
cannot be the __init__ module for an extension module.

Definition at line 536 of file _bootstrap.py.

00536 
00537     def __init__(self, name, path):
00538         """Initialize the loader.
00539 
00540         If is_pkg is True then an exception is raised as extension modules
00541         cannot be the __init__ module for an extension module.
00542 
00543         """
00544         self._name = name
00545         self._path = path

Here is the caller graph for this function:


Member Function Documentation

Return None as an extension module cannot create a code object.

Definition at line 565 of file _bootstrap.py.

00565 
00566     def get_code(self, fullname):
00567         """Return None as an extension module cannot create a code object."""
00568         return None

Here is the caller graph for this function:

Return None as extension modules have no source code.

Definition at line 570 of file _bootstrap.py.

00570 
00571     def get_source(self, fullname):
00572         """Return None as extension modules have no source code."""
00573         return None
00574 
00575 
00576 # Finders #####################################################################

Here is the caller graph for this function:

Return False as an extension module can never be a package.

Definition at line 560 of file _bootstrap.py.

00560 
00561     def is_package(self, fullname):
00562         """Return False as an extension module can never be a package."""
00563         return False

Load an extension module.

Definition at line 549 of file _bootstrap.py.

00549 
00550     def load_module(self, fullname):
00551         """Load an extension module."""
00552         is_reload = fullname in sys.modules
00553         try:
00554             return imp.load_dynamic(fullname, self._path)
00555         except:
00556             if not is_reload and fullname in sys.modules:
00557                 del sys.modules[fullname]
00558             raise

Here is the caller graph for this function:


Member Data Documentation

Definition at line 543 of file _bootstrap.py.

Definition at line 544 of file _bootstrap.py.


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