Can I decompile PYC files?

Jonathan Giddy jon at bezek.dstc.monash.edu.au
Wed Jan 24 19:52:19 EST 2001


To round out the thread, I have put my decompilation code at 
http://www.csse.monash.edu.au/~jon/python/decompiler.py

Unlike decompyle, it doesn't try to rebuild the parse tree.  It just uses 
brute-force hard-wired pattern recognition.

To get it to work, you'll need to edit the code at the bottom of the module
to do something interesting, like read argv[1], and decompile it to
argv[2].  Shouldn't be too hard.  The current code doesn't do that 
because I developed it on Idle, so it reads and writes to fixed files.

Jon.



More information about the Python-list mailing list