瀏覽

  • 索引
  • 模組 |
  • 下一頁 |
  • 上一頁 |
  • Python »
  • 3.6.13 Documentation »
  • Python 標準函式庫 (Standard Library) »
  • |

31. 匯入模組¶

本章中介绍的模块提供了导入其他Python模块和挂钩以自定义导入过程的新方法。

本章描述的完整模块列表如下:

  • 31.1. zipimport — 从 Zip 存档中导入模块
    • 31.1.1. zipimporter 对象
    • 31.1.2. 例子
  • 31.2. pkgutil — 包扩展模块工具
  • 31.3. modulefinder — 查找脚本使用的模块
    • 31.3.1. ModuleFinder 的示例用法
  • 31.4. runpy — Locating and executing Python modules
  • 31.5. importlib — The implementation of import
    • 31.5.1. 簡介
    • 31.5.2. 函数
    • 31.5.3. importlib.abc —— 关于导入的抽象基类
    • 31.5.4. importlib.machinery – Importers and path hooks
    • 31.5.5. importlib.util – Utility code for importers
    • 31.5.6. 例子
      • 31.5.6.1. Importing programmatically
      • 31.5.6.2. Checking if a module can be imported
      • 31.5.6.3. Importing a source file directly
      • 31.5.6.4. Setting up an importer
      • 31.5.6.5. Approximating importlib.import_module()

上個主題

30.2. codeop — 编译Python代码

下個主題

31.1. zipimport — 从 Zip 存档中导入模块

本頁

  • 提交 Bug
  • 顯示原始碼

瀏覽

  • 索引
  • 模組 |
  • 下一頁 |
  • 上一頁 |
  • Python »
  • 3.6.13 Documentation »
  • Python 標準函式庫 (Standard Library) »
  • |
© 版權所有 2001-2021, Python Software Foundation.
Python 软件基金会是一个非盈利组织。 请捐助。
最後更新於 2月 26, 2021。 发现了问题?
使用Sphinx2.3.1 创建。