导航

  • 索引
  • 模块 |
  • 下一页 |
  • 上一页 |
  • Python »
  • zh_CN 3.9.0a2 文档 »
  • Python 标准库 »
  • |

导入模块P

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

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

  • zipimport --- Import modules from Zip archives
    • zipimporter Objects
    • 示例
  • pkgutil --- Package extension utility
  • modulefinder --- 查找脚本使用的模块
    • ModuleFinder 的示例用法
  • runpy --- Locating and executing Python modules
  • importlib --- import 的实现
    • 概述
    • 函数
    • importlib.abc —— 关于导入的抽象基类
    • importlib.resources -- 资源
    • importlib.machinery -- Importers and path hooks
    • importlib.util -- Utility code for importers
    • 示例
      • 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
    • 概述
    • 可用 API
      • Entry points
      • Distribution metadata
      • Distribution versions
      • Distribution files
      • Distribution requirements
    • Distributions
    • Extending the search algorithm

上一个主题

codeop --- 编译Python代码

下一个主题

zipimport --- Import modules from Zip archives

本页

  • 提交 Bug
  • 显示源代码

导航

  • 索引
  • 模块 |
  • 下一页 |
  • 上一页 |
  • Python »
  • zh_CN 3.9.0a2 文档 »
  • Python 标准库 »
  • |
© 版权所有 2001-2019, Python Software Foundation.
The Python Software Foundation is a non-profit corporation. Please donate.

最后更新于 12月 19, 2019. Found a bug?
Created using Sphinx 2.2.1.