Compiled Byte code

Cliff Wells clifford.wells at comcast.net
Wed Oct 13 10:07:48 EDT 2004


On Wed, 2004-10-13 at 19:19 +0530, 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.

Incidentally, if the reason you're running into this issue is because
you've somehow lost the original .py file and have only the .pyc file,
you can use decompyle to get a pretty good restoration of the original
source.  I don't think decompyle is available anymore (except as a paid
service), but you should be able to find an old copy in someone's
archive somewhere (and it should work well on 1.5.2 .pyc files).

Regards,
Cliff

-- 
Cliff Wells <clifford.wells at comcast.net>




More information about the Python-list mailing list