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 below:
zipimport
— Import modules from Zip archives- zipimporter Objects
- Examples
pkgutil
— Package extension utilitymodulefinder
— Find modules used by a script- Example usage of
ModuleFinder
- Example usage of
runpy
— Locating and executing Python modulesimportlib
— The implementation ofimport
- Introduction
- Functions
importlib.abc
– Abstract base classes related to importimportlib.resources
– Resourcesimportlib.machinery
– Importers and path hooksimportlib.util
– Utility code for importers- Examples
- Importing programmatically
- Checking if a module can be imported
- Importing a source file directly
- Setting up an importer
- Approximating
importlib.import_module()
- Using importlib.metadata
- Overview
- Functional API
- Entry points
- Distribution metadata
- Distribution versions
- Distribution files
- Distribution requirements
- Distributions
- Extending the search algorithm
[ad_2]
Please refer to the source link for details on each topic mentioned above. Thank you
This article has been published from the source link without modifications to the text. Only the headline has been changed.