Compiled Byte code

Diez B. Roggisch deetsNOSPAM at web.de
Wed Oct 13 10:13:06 EDT 2004


Soumitri wrote:

> 
> 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.

-- 
Regards,

Diez B. Roggisch



More information about the Python-list mailing list