Python logo

上個話題

codeop --- Compile Python code

下個話題

zipimport --- Import modules from Zip archives

This page

  • 回報臭蟲
  • 顯示來源碼

導航

  • 索引
  • 模組 |
  • 下一頁 |
  • 上一頁 |
  • Python logo
  • Python »
  • 3.15.0a0 Documentation »
  • The Python Standard Library »
  • Importing Modules
  • |
  • |

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.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
      • Implementing lazy imports
      • Setting up an importer
      • Approximating importlib.import_module()
  • importlib.resources -- Package resource reading, opening and access
    • Functional API
  • importlib.resources.abc -- Abstract base classes for resources
  • importlib.metadata -- Accessing package metadata
    • Overview
    • Functional API
      • Entry points
      • Distribution metadata
      • Distribution versions
      • Distribution files
      • Distribution requirements
      • Mapping import to distribution packages
    • Distributions
    • Distribution Discovery
    • Implementing Custom Providers
      • Example
  • The initialization of the sys.path module search path
    • Virtual Environments
    • _pth files
    • Embedded Python

上個話題

codeop --- Compile Python code

下個話題

zipimport --- Import modules from Zip archives

This page

  • 回報臭蟲
  • 顯示來源碼
«

導航

  • 索引
  • 模組 |
  • 下一頁 |
  • 上一頁 |
  • Python logo
  • Python »
  • 3.15.0a0 Documentation »
  • The Python Standard Library »
  • Importing Modules
  • |
  • |
© 版權所有 2001 Python Software Foundation.
此頁面採用 Python 軟體基金會授權條款第 2 版。
文件中的範例、應用技巧與其他程式碼額外採用了 Zero Clause BSD 授權條款。
更多訊息請見歷史與授權條款。

Python 軟體基金會是一家非營利法人。 敬請捐贈。

最後更新於 10月 06, 2025 (08:22 UTC)。 發現 bug?
以 Sphinx8.2.3建立。