zrax / pycdc

C++ python bytecode disassembler and decompiler
GNU General Public License v3.0
3.25k stars 624 forks source link

Decompile PyCodeObject from CPython #192

Open iamdavidcz opened 3 years ago

iamdavidcz commented 3 years ago

Hello,

Is there an API to programmatically decompile PyCodeObject from CPython?

Regards, Dawid

zrax commented 3 years ago

No, there's no API or library currently, let alone CPython bindings; the source is just compiled into the two executables (pycdc and pycdas). I suppose you could just write the .pyc headers and call pycdc from a subprocess though...