Python provides a number of modules to assist in working with the Python language. These modules support tokenizing, parsing, syntax analysis, bytecode disassembly, and various other facilities.
这些模块包括:
parser
— 访问 Python 剖析树
ast
— 抽象句法树
symtable
— 访问编译器的符号表
symbol
— 用于 Python 剖析树的常量
token
— 用于 Python 剖析树的常量
keyword
— 测试 Python 关键词
tokenize
— 用于 Python 源代码的 Tokenizer
tabnanny
— 歧义缩进的检测
pyclbr
— Python 类浏览器支持
py_compile
— 编译 Python 源文件
compileall
— 字节编译 Python 库
dis
— 用于 Python 字节码的反汇编程序
pickletools
— 用于腌制开发者的工具