Of a sort, at least. I got Python::Bytecode working properly (Leo pointed out that my original hacked version messed up the constants) as well as getting it in a state to handle multiple code objects in a single bytecode file.
You can get the preliminary perl module at http://www.sidhe.org/~dan/Python-Bytecode-2.2.tar.gz for fooling with. Note that the docs haven't been updated, and it still doesn't do python 2.1 or 2.2 bytecode even though it claims to do so. Nor is it yet on CPAN, though I expect it will when I finish making my changes presentable and get them off to Simon.
FWIW, the rule is "Check for $foo->can('disassemble')" to see if a thing (like, say, a constant in an object's constant list) can be disassembled. If so, it's a python code object. I expect there'll be a less bad option there at some point. :)
Posted by Dan at July 11, 2004 04:09 PM | TrackBack (0)The inevitable spelling flame (and probably one that contains a misspelling of 'inevitable' since I can't be bothered to check it. "Houston, we have source"...
Posted by: Glenn Chambers at July 11, 2004 05:39 PMHuston (hu as in huge) and Houston (hou like house) are different places -- Huston is in Texas, and is where they were talking to in that quote. Houston is a street in NYC, from which SoHo comes from (South of Houston).
Posted by: James Mastros (theorbtwo) at July 12, 2004 02:23 AMUh, no. The one in Texas, where NASA is located, is spelled Houston as well:
http://www.jsc.nasa.gov/
Except, of course, I was obviously referring to Anjelica Huston, since I'm a big fan of the Addams Family.
Sheesh, you people... :-P
Posted by: Dan at July 12, 2004 09:08 AM