byteplay is a library that 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. Check the documentation to see it in action!
byteplay was written by Noam Yorav-Raphael. Support for Python 2.6 and 2.7 was added by Greg X. Iain Lowe is maintaining and packaging byteplay.
byteplay is pretty reliable - Python's complete test suite continues to pass after you use byteplay to disassemble all the code in the standard library and assemble it again!
Download it from the downloads page!