Python运行时服务¶
本章里描述的模块提供了和Python解释器及其环境交互相关的广泛服务。以下是综述:
- sys--- 系统相关的参数和函数
- sysconfig--- Provide access to Python's configuration information
- builtins--- 内建对象
- __main__--- 顶层脚本环境
- warnings—— 警告信息的控制
- dataclasses--- 数据类
- contextlib--- 为- with语句上下文提供的工具
- abc--- 抽象基类
- atexit--- 退出处理器
- traceback--- 打印或检索堆栈回溯
- __future__--- Future 语句定义
- gc--- 垃圾回收器接口
- inspect--- 检查对象
- site—— 站点专属的配置钩子
