Python "decompyle"

  • Thread starter =?iso-8859-15?Q?David_D=FCrrenmatt?=
  • Start date
?

=?iso-8859-15?Q?David_D=FCrrenmatt?=

Hi.

If I try to use decompyle (decompyle-2.3) for pyc-files < version 2.0, I
get an error with marshal_20 (ImportError: dynamic module does not define
init function (initmarshal_20) ). marshal_20 was compiled to a so-file
using gcc.

Does anybody know where this error could come from and how to solve it?

Thanks,
dave
 
T

Terry Reedy

David Dürrenmatt said:
If I try to use decompyle (decompyle-2.3) for pyc-files < version 2.0, I
get an error with marshal_20 (ImportError: dynamic module does not define
init function (initmarshal_20) ). marshal_20 was compiled to a so-file
using gcc.

Does anybody know where this error could come from and how to solve it?

Your post suggests that your build does work for .pyc files >= version 2.0.
Is this correct? Does the doc for decompyle say it should work for earlier
versions?

The creation of .pyc files is a CPython implementation detail and the
format is version specific. So it is easy to imagine that dycompyle might
give up or occasionally misfire with ancient .pycs. But maybe the answer
lies elsewhere.

Terry J. Reedy
 
?

=?iso-8859-15?Q?David_D=FCrrenmatt?=

Your post suggests that your build does work for .pyc files >= version
2.0.
Is this correct? Does the doc for decompyle say it should work for
earlier
versions?

Yes, it does work. And documentation says, it should.

Fact is, marshal_20 is used to read the marshaled data in the pyc files <
2.0 (different version of marshal). And the problem doesn't really lie in
decompyle itsself: if I try to import marshal_20 from python prompt, I get
the error mentioned above.


Thanks,
dave
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,202
Messages
2,571,057
Members
47,667
Latest member
DaniloB294

Latest Threads

Top