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.
These modules include:
ast — Abstract syntax trees
symtable — Access to the compiler’s symbol tables
token — Constants used with Python parse treeskeyword — Testing for Python keywordstokenize — Tokenizer for Python source
tabnanny — Detection of ambiguous indentationpyclbr — Python module browser support
py_compile — Compile Python source files
compileall — Byte-compile Python libraries
dis — Disassembler for Python bytecode
pickletools — Tools for pickle developers