importlib — The implementation of import — Python 3.14.7 documentation

docs.python.org

Tin mới

runpy — Locating and executing Python modules

importlib.resources – Package resource reading, opening and access

Python Module Index

3.14.7 Documentation

The Python Standard Library

importlib.metadata

importlib.metadata presents access to metadata from third-party distributions.

The import statement

Original specification of packages. Some semantics have changed since the writing of this document (e.g. redirecting based on None in sys.modules).

The initialization of the sys.path module search path

Original specification of packages. Some semantics have changed since the writing of this document (e.g. redirecting based on None in sys.modules).

sys: Access system-specific parameters and functions.

Reload a previously imported module. The argument must be a module object, so it must have been successfully imported before. This is useful if you have edited the module source file using an external editor and want to

__main__: The environment where top-level code is run. Covers command-line interfaces, import-time behavior, and ``__name__ == '__main__'``.

Reload a previously imported module. The argument must be a module object, so it must have been successfully imported before. This is useful if you have edited the module source file using an external editor and want to

builtins: The module that provides the built-in namespace.

Reload a previously imported module. The argument must be a module object, so it must have been successfully imported before. This is useful if you have edited the module source file using an external editor and want to

ModuleNotFoundError

Changed in version 3.7: ModuleNotFoundError is raised when the module being reloaded lacks a ModuleSpec.

importlib.resources.abc.ResourceReader

An abstract base class for a loader. See PEP 302 for the exact definition for a loader.

module.__package__

universal newlines

An abstract method to return the source of a module. It is returned as a text string using universal newlines, translating all recognized line separators into '\n' characters. Returns None if no source is available (e.g.

inspect.getmodulename()

Returns a combined list of strings representing all file suffixes for modules recognized by the standard import machinery. This is a helper for code which simply needs to know if a filesystem path potentially refers to a

site: Module responsible for site-specific configuration.

Deprecated since version 3.6: Use site configuration instead. Future versions of Python may not enable this finder by default.