31. 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:
- 31.1.
imp
— Access theimport
internalsget_magic()
get_suffixes()
find_module()
load_module()
new_module()
lock_held()
acquire_lock()
release_lock()
PY_SOURCE
PY_COMPILED
C_EXTENSION
PKG_DIRECTORY
C_BUILTIN
PY_FROZEN
SEARCH_ERROR
init_builtin()
init_frozen()
is_builtin()
is_frozen()
load_compiled()
load_dynamic()
load_source()
NullImporter
- 31.1.1. Examples
- 31.2.
importlib
— Convenience wrappers for__import__()
- 31.3.
imputil
— Import utilities - 31.4.
zipimport
— Import modules from Zip archives - 31.5.
pkgutil
— Package extension utility - 31.6.
modulefinder
— Find modules used by a script - 31.7.
runpy
— Locating and executing Python modules