PyDocs

Nav

Importing Modules

Loader

Abstract base class for import loaders.
Changed in 3.7, 3.15
  • 3.7: Introduced the optional get_resource_reader() method.
  • 3.15: Removed the load_module() method. create_module(spec) A method that returns the module object to use when importing a module. This method may return None, indicating that default module creation semantics should take place. Added in version 3.4. Changed in version 3.6: This method is no longer optional when exec_module() is defined. exec_module(module) An abstract method that executes the module in its own namespace when a module is imported or reloaded. The module should already be initialized when exec_module() is called. When this method exists, create_module() must be defined. Added in version 3.4. Changed in version 3.6: create_module() must also be defined.
Members of Loader

c

create_module
Return a module to initialize and into which to load.

e

exec_module
An abstract method that executes the module in its own namespace when a module is imported or reloaded.
0 Examples
No examples for importlib.abc/Loader.
See Also
No see-alsos for importlib.abc/Loader
0 Notes
No notes for Loader