decompyle does not work for python 1.5-2.1 pyc's
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| decompyle (Ubuntu) |
Invalid
|
Undecided
|
Unassigned | ||
Bug Description
Binary package hint: decompyle
Description: Ubuntu 8.10
Release: 8.10
apt-cache policy decompyle
decompyle:
Installed: 2.3.2-4.1
Candidate: 2.3.2-4.1
Version table:
*** 2.3.2-4.1 0
500 http://
100 /var/lib/
When I try to run the decompyle on older code it errors out (tried it on version 1.5 and 2.1 pyc's)
I think /usr/share/
try: FOR_ITER = self.dis.
except: FOR_ITER = None
try: GET_ITER = self.dis.
except: GET_ITER = None
try: FOR_LOOP = self.dis.
except: FOR_LOOP = None
and
if ord(code[i]) in (FOR_ITER, GET_ITER, FOR_LOOP): # Added FOR_LOOP for older versions.
As the older versions of python seem to use FOR_LOOP instead of FOR_ITER or GET_ITER.
When I made these changes it could decompile the older version code - not sure if I broke anything else - I'm not a python guru by any means.

Hi, decompyle has been removed from the repositories as it does not support python 2.5/2.6 decompilation, although it works python 2.6: /bugs.launchpad .net/ubuntu/ +source/ decompyle/ +bug/336859
https:/
Try sending your patch upstream at debian, but be aware that there is also a request to be removed: bugs.debian. org/cgi- bin/bugreport. cgi?bug= 517588
http://