Importing Modules¶
The modules described in this chapter provide new ways to import other Python modules and hooks for customizing the import process.
The full list of modules described in this chapter is:
zipimport
— Import modules from Zip archivesZipImportError
- zipimporter Objects
zipimporter
zipimporter.create_module()
zipimporter.exec_module()
zipimporter.find_loader()
zipimporter.find_module()
zipimporter.find_spec()
zipimporter.get_code()
zipimporter.get_data()
zipimporter.get_filename()
zipimporter.get_source()
zipimporter.is_package()
zipimporter.load_module()
zipimporter.invalidate_caches()
zipimporter.archive
zipimporter.prefix
- Examples
pkgutil
— Package extension utilitymodulefinder
— Find modules used by a scriptrunpy
— Locating and executing Python modulesimportlib
— The implementation ofimport
- Introduction
- Functions
importlib.abc
– Abstract base classes related to importimportlib.machinery
– Importers and path hooksimportlib.util
– Utility code for importers- Examples
importlib.resources
– Resources- Deprecated functions
importlib.resources.abc
– Abstract base classes for resources- Using
importlib.metadata
- The initialization of the
sys.path
module search path