importlib — The implementation of import — Python 3.16.0a0 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.16.0a0 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).

ModuleNotFoundError

Import a module. The name argument specifies what module to import in absolute or relative terms (e.g. either pkg.mod or ..mod). If the name is specified in relative terms, then the package argument must be set to the na

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

collections.abc.Iterable

This method can potentially yield a very large number of objects, and it may carry out IO operations when computing these values.

importlib.resources.abc.ResourceReader

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

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.

module.__package__

(Read-only) The fully qualified name of the package the module is in (or the empty string for a top-level module). See module.__package__. If the module is a package then this is the same as name.