importlib.machinery.SourceFileLoader.path_stats()

path_stats(path) Concrete implementation of importlib.abc.SourceLoader.path_stats().

importlib.machinery.SourceFileLoader.path

path The path to the source file.

importlib.machinery.SourceFileLoader.name

name The name of the module that this loader will handle.

importlib.machinery.SourceFileLoader.load_module()

load_module(name=None) Concrete implementation of importlib.abc.Loader.load_module() where specifying the name of the module to load is optional.

importlib.machinery.SourceFileLoader.is_package()

is_package(fullname) Return true if path appears to be for a package.

importlib.machinery.SourceFileLoader

class importlib.machinery.SourceFileLoader(fullname, path) A concrete implementation of importlib.abc.SourceLoader by subclassing importlib.abc.FileLoader and providing some concrete implementations of other methods. New in version 3.3. name The name of the module that this loader will handle. path The path to the source file. is_package(fullname) Return true if path appears to be for a package. path_stats(path) Concrete implementation of importlib.abc.SourceLoader.pat

importlib.machinery.PathFinder.invalidate_caches()

classmethod invalidate_caches() Calls importlib.abc.PathEntryFinder.invalidate_caches() on all finders stored in sys.path_importer_cache.

importlib.machinery.PathFinder.find_spec()

classmethod find_spec(fullname, path=None, target=None) Class method that attempts to find a spec for the module specified by fullname on sys.path or, if defined, on path. For each path entry that is searched, sys.path_importer_cache is checked. If a non-false object is found then it is used as the path entry finder to look for the module being searched for. If no entry is found in sys.path_importer_cache, then sys.path_hooks is searched for a finder for the path entry and, if found, is stor

importlib.machinery.PathFinder.find_module()

classmethod find_module(fullname, path=None) A legacy wrapper around find_spec(). Deprecated since version 3.4: Use find_spec() instead.

importlib.machinery.PathFinder

class importlib.machinery.PathFinder A Finder for sys.path and package __path__ attributes. This class implements the importlib.abc.MetaPathFinder ABC. Only class methods are defined by this class to alleviate the need for instantiation. classmethod find_spec(fullname, path=None, target=None) Class method that attempts to find a spec for the module specified by fullname on sys.path or, if defined, on path. For each path entry that is searched, sys.path_importer_cache is checked. If a non-