importlib.machinery.FrozenImporter

class importlib.machinery.FrozenImporter An importer for frozen modules. This class implements the importlib.abc.MetaPathFinder and importlib.abc.InspectLoader ABCs. Only class methods are defined by this class to alleviate the need for instantiation.

importlib.machinery.FileFinder.path_hook()

classmethod path_hook(*loader_details) A class method which returns a closure for use on sys.path_hooks. An instance of FileFinder is returned by the closure using the path argument given to the closure directly and loader_details indirectly. If the argument to the closure is not an existing directory, ImportError is raised.

importlib.machinery.FileFinder.path

path The path the finder will search in.

importlib.machinery.FileFinder.invalidate_caches()

invalidate_caches() Clear out the internal cache.

importlib.machinery.FileFinder.find_spec()

find_spec(fullname, target=None) Attempt to find the spec to handle fullname within path. New in version 3.4.

importlib.machinery.FileFinder.find_loader()

find_loader(fullname) Attempt to find the loader to handle fullname within path.

importlib.machinery.FileFinder

class importlib.machinery.FileFinder(path, *loader_details) A concrete implementation of importlib.abc.PathEntryFinder which caches results from the file system. The path argument is the directory for which the finder is in charge of searching. The loader_details argument is a variable number of 2-item tuples each containing a loader and a sequence of file suffixes the loader recognizes. The loaders are expected to be callables which accept two arguments of the module’s name and the path to

importlib.machinery.EXTENSION_SUFFIXES

importlib.machinery.EXTENSION_SUFFIXES A list of strings representing the recognized file suffixes for extension modules. New in version 3.3.

importlib.machinery.ExtensionFileLoader.path

path Path to the extension module.

importlib.machinery.ExtensionFileLoader.name

name Name of the module the loader supports.