codetransformer

Bytecode transformers for CPython inspired by the ast module’s NodeTransformer.

codetransformer is a library that provides utilities for working with CPython bytecode at runtime. Among other things, it provides:

The existence of codetransformer is motivated by the desire to override parts of the python language that cannot be easily hooked via more standard means. Examples of program transformations made possible using code transformers include:

Contents:

Indices and tables