Tool:Uncompyle6
Appearance
| Developer | Rocky Bernstein and contributors |
|---|---|
| License | GPL-3.0 |
| Website | https://github.com/rocky/python-uncompyle6 |
| On this wiki | Facts · Code · Notes · Topics |
uncompyle6 (GPL-3.0, rocky) decompiles CPython bytecode from Python 1.0 to 3.8 (some PyPy and Dropbox 2.5 too); strongest around 2.7 and 3.3-3.4, with fragment deparsing.
Supported versions
The README says it accepts bytecode from Python 1.0 to 3.8, includes Dropbox's Python 2.5 bytecode and some PyPy bytecode, and elsewhere lists tested versions 1.4, 2.1-2.7, 3.0-3.8. Python 3.0 to 3.2 and 3.3 to 3.5 and 3.6 to 3.10 are separate release tarballs/branches (uncompyle6_30, _33, _36) for use on the matching interpreter; the unsuffixed PyPI package needs Python 3.11 or later to run. For 3.7 and 3.8 the author points to Tool:Decompyle3 or pycdc instead.
Known failure modes (from its README)
- Control flow is the biggest problem: no Python decompiler gets it all right; some wrong output is detected and reported.
- In the Python 3 series support is strongest around 3.3-3.4 and weakens away from them; 3.6 changed to word code, and 3.5-3.7 and 3.8 (removed SETUP_LOOP, SETUP_EXCEPT) changed much.
- Not all magic numbers are supported (notably some 3.6 ones); only released versions, not candidates.
- Dozens of known isolated bugs; few maintainers.
Related
Technique:Choosing a decompiler, Tool:Pycdc, Tool:PyLingual.
Sources
- README.rst and COPYING of https://github.com/rocky/python-uncompyle6.
Code & repositories
- https://github.com/rocky/python-uncompyle6 @
91298ba80e322cfb8736ab8a697509527297a7a9· license: GPL-3.0-only (declared by the contributor; GitHub's detector did not recognize COPYING)
uncompyle6, Python 1.0 to 3.8 bytecode decompiler
Tested on: source read, not run: not run; README read · checked 2026-10-18