Back to index

python3.2  3.2.2
Public Member Functions | Private Member Functions
importlib._bootstrap._DefaultPathFinder Class Reference
Inheritance diagram for importlib._bootstrap._DefaultPathFinder:
Inheritance graph
Collaboration diagram for importlib._bootstrap._DefaultPathFinder:
Collaboration graph

List of all members.

Public Member Functions

def find_module

Private Member Functions

def _path_hooks
def _path_importer_cache

Detailed Description

Subclass of PathFinder that implements implicit semantics for

Definition at line 725 of file

Member Function Documentation

def importlib._bootstrap._DefaultPathFinder._path_hooks (   cls,
) [private]
Search sys.path_hooks as well as implicit path hooks.

Definition at line 731 of file

00732     def _path_hooks(cls, path):
00733         """Search sys.path_hooks as well as implicit path hooks."""
00734         try:
00735             return super()._path_hooks(path)
00736         except ImportError:
00737             implicit_hooks = [_DEFAULT_PATH_HOOK, imp.NullImporter]
00738             return super()._path_hooks(path, implicit_hooks)

Use the default path hook when None is stored in

Definition at line 740 of file

00741     def _path_importer_cache(cls, path):
00742         """Use the default path hook when None is stored in
00743         sys.path_importer_cache."""
00744         return super()._path_importer_cache(path, _DEFAULT_PATH_HOOK)

def importlib._bootstrap.PathFinder.find_module (   cls,
  path = None 
) [inherited]
Find the module on sys.path or 'path' based on sys.path_hooks and

Definition at line 624 of file

00625     def find_module(cls, fullname, path=None):
00626         """Find the module on sys.path or 'path' based on sys.path_hooks and
00627         sys.path_importer_cache."""
00628         if not path:
00629             path = sys.path
00630         for entry in path:
00631             try:
00632                 finder = cls._path_importer_cache(entry)
00633             except ImportError:
00634                 continue
00635             if finder:
00636                 loader = finder.find_module(fullname)
00637                 if loader:
00638                     return loader
00639         else:
00640             return None

Here is the caller graph for this function:

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