My favorites | Sign in
Project Logo
                
People details
Project owners:
  noamraph
Project committers:
iain.lowe

byteplay lets you convert Python code objects into equivalent objects which are easy to play with, and lets you convert those objects back into living Python code objects. It's useful for applying crazy transformations on Python functions, and is also useful in learning Python byte code intricacies. It currently works with Python 2.4 and 2.5.

It's similar in purpose to Michael Hudson's bytecodehacks, and can be compared with Phillip J. Eby's peak.util.assembler.

I think it's pretty reliable - Python's complete test suite continues to pass after you use byteplay to disassemble all function objects and assemble them again!

Download it from http://byteplay.googlecode.com/svn/trunk/byteplay.py!









Hosted by Google Code