Importing Modules — Python 3.14.7 documentation

docs.python.org

Tin mới

Operating System Utilities

Data marshalling support

Python Module Index

3.14.7 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

PyObject_GetAttr()

Import the module mod_name and get its attribute attr_name.