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'd be interested
to know if P::B::S treats your example python bytecode any better than
P::B. If so, maybe someone could take part of P::B::S and use it.

  http://www.gregorpurdy.com/gregor/sw/Python-Bytecode-SAX/


Regards,

-- 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

Reply via email to