July 06, 2004

Decompiling python bytecode

Since my machine is making what can reasonably be described as Bad Noises, I figure I'd best get this put up while I still can. This, then, is Python::Bytecode v2.1, a variant of Simon Cozens' version on CPAN. The difference here is that it knows about Python 2.3 bytecode and doesn't know about version 2.1 and 2.2 bytecode. (Though it claims it does)

This version has several issues. First, the tests fail, because I switched out the test bytecode files. (The tests actually work, just the data they're looking at is different than what they should be looking at) Second, it's convinced that there is a single code object in each bytecode file, which is definitetly Not True.

The first issue's mine, the second's the original module's issue. (Basically the bytecode object and the bytecode file object are the same thing, which isn't right--each file can have multiple bytecode objects in it) Anyone wanting to take a shot at fixing it while my machine gently weeps would be much appreciated.

Posted by Dan at July 6, 2004 08:01 PM | TrackBack (0)
Comments