11uncompyle6
22==========
33
4- A CPython 2.x and possibly 3.x byte-code disassembler and
5- adecompiler.
4+ A Python 2.x and possibly 3.x byte-code decompiler.
65
76This is written in Python 2.7 but is Python3 compatible.
87
98
109Introduction
1110------------
1211
13- 'uncompyle6' converts Python byte-code back into equivalent Python
12+ _uncompyle6_ converts Python byte-code back into equivalent Python
1413source code. It accepts byte-codes from Python version 2.5 to 2.7.
15- It runs on Python 2.7 and, with a little more work, on Python 3 as well .
14+ It runs on Python 2.7 and with a little more work Python 3.
1615
1716The generated source is fairly readable: docstrings, lists, tuples and
1817hashes are somewhat pretty-printed.
1918
20- 'uncompyle6' is based on John Aycock's generic small languages
21- compiler 'spark' (http://pages.cpsc.ucalgary .ca/~aycock/spark /) and his
19+ _uncompyle6_ is based on John Aycock's generic small languages
20+ compiler 'spark' (http://www.csr.uvic .ca/~aycock/python /) and his
2221prior work on a tool called 'decompyle'. This was improved by Hartmut Goebel
23- http://www.crazy-compilers.com
22+ ` http://www.crazy-compilers.com/ `_
2423
25- In order to the decompile a program, we need to be able to disassemble
26- it first. And this process may be useful in of itself. So we provide a
27- utility for just that piece as well.
24+ # Additional note (3 July 2004):
2825
29- 'pydisassemble' gives a CPython disassembly of Python byte-code. How
30- is this different than what Python already provides via the "dis"
31- module? Here, we can cross disassemble bytecodes from different
32- versions of CPython than the version of CPython that is doing the
33- disassembly.
26+ This software is no longer available from the original website.
27+ However http://www.crazy-compilers.com/decompyle/ provides a
28+ decompilation service.
3429
35- 'pydisassemble works on the same versions as 'uncompyle6' and handles the
36- same sets of CPython bytecode versions.
37-
38- *Note from 3 July 2004: *
39-
40- This software was original available from http://www.crazy-compilers.com;
41- http://www.crazy-compilers.com/decompyle/ provides a decompilation service.
42-
43- *Note (5 June 2012): *
30+ # Additional note (5 June 2012):
4431
4532The decompilation of python bytecode 2.5 & 2.6 is based on the work of
4633Eloi Vanderbeken. bytecode is translated to a pseudo 2.7 python bytecode
4734and then decompiled.
4835
49- * Note (12 Dec 2016):*
36+ # Additional note (12 Dec 2016):
5037
51- This project will be used to deparse fragments of code inside my
52- trepan _ debuggers _. For that, I need to record text fragements for all
38+ I will be using this to deparse fragments of code inside my trepan _
39+ debuggers _. For that, I need to record text fragements for all
5340byte-code offsets (of interest). This purpose although largely
5441compatible with the original intention is yet a little bit different.
5542
@@ -80,8 +67,6 @@ Installation
8067
8168This uses setup.py, so it follows the standard Python routine:
8269
83- ::
84-
8570 python setup.py install # may need sudo
8671 # or if you have pyenv:
8772 python setup.py develop
@@ -103,18 +88,15 @@ Usage
10388
10489Run
10590
106- ::
107-
10891 ./scripts/uncompyle6 -h
10992
110-
11193for usage help
11294
11395
11496Known Bugs/Restrictions
11597-----------------------
11698
117- Support for Python 3 bytecode and syntax is lacking.
99+ Support Python 3 bytecode and syntax is lacking.
118100
119101.. _trepan : https://pypi.python.org/pypi/trepan
120102.. _debuggers : https://pypi.python.org/pypi/trepan3k
0 commit comments