[Bug 330374] [NEW] decompyle does not work for python 1.5-2.1 pyc's
issaqua
marcusv at issaqua.net.au
Tue Feb 17 03:40:29 UTC 2009
Public bug reported:
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://mirror.internode.on.net intrepid/universe Packages
100 /var/lib/dpkg/status
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/pyshared/decompyle/Scanner.py should have the
following code
try: FOR_ITER = self.dis.opmap['FOR_ITER']
except: FOR_ITER = None
try: GET_ITER = self.dis.opmap['GET_ITER']
except: GET_ITER = None
try: FOR_LOOP = self.dis.opmap['FOR_LOOP'] # Added for older python versions.
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.
** Affects: decompyle (Ubuntu)
Importance: Undecided
Status: New
--
decompyle does not work for python 1.5-2.1 pyc's
https://bugs.launchpad.net/bugs/330374
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
--
ubuntu-bugs mailing list
ubuntu-bugs at lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
More information about the universe-bugs
mailing list