Skip to content

Blip: a Python 3 bytecode compiler

bjpop edited this page Apr 7, 2013 · 4 revisions

Blip is a bytecode compiler for Python 3.

The output bytecode is compatible with the CPython interpreter.

For example, given a Python 3 source file called foo.py, the command:

blip foo.py

produces a bytecode file called foo.pyc. The bytecode can be executed by passing it as an argument to a CPython interpreter:

python3 foo.pyc

You can specify more than one python source file on the command line; Blip will compile them all in sequence, stopping at the first error encountered.

The Blip source tree also includes code for a program called readpyc, which can be used for pretty printing the contents of .pyc files:

readpyc foo.pyc

This is very helpful for development because you can use it to compare Blip's output with that of CPython.

Clone this wiki locally