importlib.abc.InspectLoader.is_package()

is_package(fullname) An abstract method to return a true value if the module is a package, a false value otherwise. ImportError is raised if the loader cannot find the module. Changed in version 3.4: Raises ImportError instead of NotImplementedError.

importlib.abc.InspectLoader.get_source()

abstractmethod get_source(fullname) An abstract method to return the source of a module. It is returned as a text string using universal newlines, translating all recognized line separators into '\n' characters. Returns None if no source is available (e.g. a built-in module). Raises ImportError if the loader cannot find the module specified. Changed in version 3.4: Raises ImportError instead of NotImplementedError.

importlib.abc.InspectLoader.load_module()

load_module(fullname) Implementation of Loader.load_module(). Deprecated since version 3.4: use exec_module() instead.

importlib.abc.Finder.find_module()

abstractmethod find_module(fullname, path=None) An abstact method for finding a loader for the specified module. Originally specified in PEP 302, this method was meant for use in sys.meta_path and in the path-based import subsystem. Changed in version 3.4: Returns None when called instead of raising NotImplementedError.

importlib.abc.InspectLoader

class importlib.abc.InspectLoader An abstract base class for a loader which implements the optional PEP 302 protocol for loaders that inspect modules. get_code(fullname) Return the code object for a module, or None if the module does not have a code object (as would be the case, for example, for a built-in module). Raise an ImportError if loader cannot find the requested module. Note While the method has a default implementation, it is suggested that it be overridden if possible for perf

importlib.abc.InspectLoader.exec_module()

exec_module(module) Implementation of Loader.exec_module(). New in version 3.4.

importlib.abc.InspectLoader.get_code()

get_code(fullname) Return the code object for a module, or None if the module does not have a code object (as would be the case, for example, for a built-in module). Raise an ImportError if loader cannot find the requested module. Note While the method has a default implementation, it is suggested that it be overridden if possible for performance. Changed in version 3.4: No longer abstract and a concrete implementation is provided.

importlib.abc.FileLoader.get_filename()

abstractmethod get_filename(fullname) Returns path.

importlib.abc.FileLoader.name

name The name of the module the loader can handle.

importlib.abc.FileLoader.load_module()

load_module(fullname) Calls super’s load_module(). Deprecated since version 3.4: Use Loader.exec_module() instead.