On Mon, 12 Jul 2004, Gregor N. Purdy wrote: > Leo -- > > I had tinkered around with this stuff back in 2003, and ended up writing > Python::Bytecode::SAX to help me visualize bytecode. IIRC, I ran into > the same issue of only disassembling one code block.
I've finished up (yay, free time at lunch!) the last abuse of Python::Bytecode, so it now handles all the code objects in a bytecode file, as well as fixing up the stupid constant offset problem I introduced in 2.1 and 2.2. I'll note a release in a sec... > -- Gregor > > Leopold Toetsch wrote: > > ... is on CPAN (said Dan) and is broken. I'd be glad if people could fix > > it and send me a running version ;) > > * constants are messed up > > * it doesn't disassemble all code objects of a .pbc - just one > > > > $ cd languages/python > > $ perl pie-thon.pl -dD some.py > > > > shows more (and AFAIK correct) Python disassembly (it's using dis.py) - > > but e.g. lambda code objects are missing as well as class initializers > > and such stuff. > > > > $ perl pie-thon.pl xyz.py | ../../parrot - > > > > runs that stuff (if it's implemented ;) > > > > Thanks, > > leo > > > Dan --------------------------------------"it's like this"------------------- Dan Sugalski even samurai [EMAIL PROTECTED] have teddy bears and even teddy bears get drunk