Tool
uncompyle6
Cross-version decompiler that translates Python bytecode back into equivalent Python source, accepting bytecode from Python 1.0 through 3.8 as well as some PyPy bytecode and Dropbox's Python 2.5. It disassembles code objects with the companion xdis library and parses the instruction stream into a grammar-based tree from which source is printed; it can also deparse just the fragment around a given bytecode offset, which the author's trepan debuggers use for exact location reporting. It succeeds the older decompyle, uncompyle and uncompyle2 forks.
Requirements and limitations
- Latest release at review: 3.9.3, published 2025-09-29 on GitHub and PyPI; the reviewed master commit is 34 commits later and reports 3.9.4.dev0. Installing from PyPI, like the master branch, is meant for running on Python 3.11+; older interpreters back to Python 2.4 use the version-specific tarballs, eggs or wheels on GitHub Releases, built from separate git branches. It depends on xdis 6.3+, spark-parser and click.
- The README reports testing on bytecode from Python 1.4, 2.1–2.7 and 3.0–3.8 and later PyPy versions. Python 3 support is strongest around 3.3–3.4 and weakens further away, control flow is the biggest known problem, and the author does not intend serious work on 3.8 or 3.9, pointing to the separate decompyle3 for 3.7 and 3.8. Bytecode newer than 3.8 is not decompiled, and candidate-release magic numbers, some Python 3.6 magic variants, encrypted or custom-interpreter bytecode other than Dropbox's old 2.5, obfuscated code, Cython and MicroPython are not handled.
- Input .pyc or .pyo files come from the user; it cannot decompile Py2EXE executables directly, and bytecode bundled by such packagers has to be extracted first. The --syntax-verify option checks only that the output is valid Python syntax, so the README suggests cross-checking with other uncompyle6 versions or other decompilers such as pycdc. Recovered source remains subject to the rights of the original program’s owner.
- GPL-3.0-or-later per pyproject.toml, with the GPL-3.0 text in COPYING. Nothing was installed or decompiled.
About this entry
- Type
- Tool
- Category
- Native analysis tools
- Relationship
- Foundation tool
- Targets
- App · Binary
Sources reviewed
The description was reviewed against primary sources. This does not establish runtime testing, security auditing or verified compatibility.
Primary sources
- README.rst GitHub · rocky/python-uncompyle6 · Revision 91298ba
- README.rst#L77-L126 GitHub · rocky/python-uncompyle6 · Revision 91298ba
- README.rst#L176-L299 GitHub · rocky/python-uncompyle6 · Revision 91298ba
- NEWS.md GitHub · rocky/python-uncompyle6 · Revision 91298ba
- pyproject.toml GitHub · rocky/python-uncompyle6 · Revision 91298ba
- uncompyle6/version.py GitHub · rocky/python-uncompyle6 · Revision 91298ba
- COPYING GitHub · rocky/python-uncompyle6 · Revision 91298ba
- https://github.com/rocky/python-uncompyle6/releases/tag/3.9.3
- https://pypi.org/project/uncompyle6/3.9.3/