Newbie question re: decompiling python

Thomas Wouters thomas at xs4all.net
Tue Aug 15 06:43:49 EDT 2000


On Tue, Aug 15, 2000 at 10:29:00AM +0100, Peter J White wrote:

> How can I decompile a python PYC file to see the source?

You cannot. .pyc files are bytecode, and you can only disassemble them into a
representation of bytecode. That's not as low-level as machine-code, but
it's not Python code either ! See the 'dis' module on how to disassemble.

-- 
Thomas Wouters <thomas at xs4all.net>

Hi! I'm a .signature virus! copy me into your .signature file to help me spread!




More information about the Python-list mailing list