Importing Modules — Python 3.16.0a0 documentation

docs.python.org

Tin mới

Operating System Utilities

Data marshalling support

Python Module Index

3.16.0a0 Documentation

Python/C API reference manual

borrowed reference

Similar to PyImport_AddModuleRef(), but return a borrowed reference and name is a Python str object.

importlib.machinery.SourceFileLoader

The module’s __spec__ and __loader__ will be set, if not set already, with the appropriate values. The spec’s loader will be set to the module’s __loader__ (if set) and to an instance of SourceFileLoader otherwise.

codeobject.co_filename

The module’s __spec__ and __loader__ will be set, if not set already, with the appropriate values. The spec’s loader will be set to the module’s __loader__ (if set) and to an instance of SourceFileLoader otherwise.

sys.path_importer_cache

initialization functions

Initialization function for a module built into the interpreter.

PyObject_GetAttr()

Import the module mod_name and get its attribute attr_name.