PyDocs

Python Language Services

py_compile

Routine to "compile" a .py file to a .pyc file.

This module has intimate knowledge of the format of .pyc files.
Symbols in py_compile

c

compile
Byte-compile one Python source file to Python bytecode.

p

PycInvalidationMode
An enumeration of possible methods the interpreter can use to determine whether a bytecode file is up to date with a source file.
PyCompileError
Exception raised when an error occurs while attempting to compile the file.