Compiled Byte code

S

Soumitri

Hi,

Is there a dependency of version or platform for running a snippet of
python compiled code? I have a .pyc (possibly created on a *nix box)
that was created off ver 1.5.2 and returns a "Bad Magic Number in .pyc
file" error when i run a box with XP and Python 2.3.

I would greatly appreciate your thoughts/any pointers to docs on this.

Cheers,
Soumitri.
 
D

Diez B. Roggisch

Soumitri said:
Hi,

Is there a dependency of version or platform for running a snippet of
python compiled code? I have a .pyc (possibly created on a *nix box)
that was created off ver 1.5.2 and returns a "Bad Magic Number in .pyc
file" error when i run a box with XP and Python 2.3.

The python bytecode is not guaranteed to remain untouched between major
version number changes - maybe it even changes on minor numbers. So you are
in trouble here if you don't possess the sourcecode. Maybe a service like
decompyle can help you.
 

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

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top