Skip to content

Saegl/inspect_cpython

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Inspect CPython

My notes on how to inspect CPython interpreter and it's bytecode

Show Abstract Syntax Tree

python -m ast example_programs/hello.py

Show bytecode

python -m dis example_programs/hello.py

Compile to bytecode

python -m py_compile example_programs/hello.py

Compile to bytecode with marshal

python -m compiler.py example_programs/hello.py output.pyc
python output.pyc

All in one inspection tools

Disassembler, AST and others in one script. See python itools.py --help for options.

python itools.py example_programs/hello.py

About

Inspect CPython internals

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages