Logo

上一个主题

codeop --- Compile Python code

下一个主题

zipimport --- Import modules from Zip archives

本页

  • Report a Bug
  • 显示源代码

导航

  • 索引
  • 模块 |
  • 下一页 |
  • 上一页 |
  • python logo
  • Python »
  • 3.8.20 Documentation »
  • The Python Standard Library »
  • |

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:

  • zipimport --- Import modules from Zip archives
    • zipimporter Objects
    • Examples
  • pkgutil --- Package extension utility
  • modulefinder --- Find modules used by a script
    • Example usage of ModuleFinder
  • runpy --- Locating and executing Python modules
  • importlib --- The implementation of import
    • Introduction
    • Functions
    • importlib.abc -- Abstract base classes related to import
    • importlib.resources -- Resources
    • importlib.machinery -- Importers and path hooks
    • importlib.util -- Utility code for importers
    • Examples
      • Importing programmatically
      • Checking if a module can be imported
      • Importing a source file directly
      • Setting up an importer
      • Approximating importlib.import_module()
  • Using importlib.metadata
    • Overview
    • Functional API
      • Entry points
      • Distribution metadata
      • Distribution versions
      • Distribution files
      • Distribution requirements
    • Distributions
    • Extending the search algorithm

上一个主题

codeop --- Compile Python code

下一个主题

zipimport --- Import modules from Zip archives

本页

  • Report a Bug
  • 显示源代码

导航

  • 索引
  • 模块 |
  • 下一页 |
  • 上一页 |
  • python logo
  • Python »
  • 3.8.20 Documentation »
  • The Python Standard Library »
  • |
© 版权所有 2001-2025, Python Software Foundation.
This page is licensed under the Python Software Foundation License Version 2.
Examples, recipes, and other code in the documentation are additionally licensed under the Zero Clause BSD License.

The Python Software Foundation is a non-profit corporation. Please donate.

最后更新于 8月 10, 2025. Found a bug?
Created using Sphinx 2.4.4.