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:
parser
Access parse trees for Python source code. symbol
Constants representing internal nodes of the parse tree.
token
Constants representing terminal nodes of the parse tree. keyword
Test whether a string is a keyword in Python.
tokenize
Lexical scanner for Python source code. tabnanny
Tool for detecting white space related problems
in Python source files in a directory tree.
pyclbr
Supports information extraction for a Python class
browser. py_compile
Compile Python source files to byte-code files.
compileall
Tools for byte-compiling all Python source files in a
directory tree. dis
Disassembler for Python byte code.
pickletools
Contains extensive comments about the pickle protocols and pickle-machine opcodes, as well as some useful functions. distutils
Support for building and installing Python modules
into an existing Python installation.