Compiled Byte code

Discussion in 'Python' started by Soumitri, Oct 13, 2004.

  1. Soumitri

    Soumitri Guest

    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.
     
    Soumitri, Oct 13, 2004
    #1
    1. Advertising

  2. 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
     
    Diez B. Roggisch, Oct 13, 2004
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Klaus Schneider
    Replies:
    1
    Views:
    582
    Rolf Magnus
    Dec 2, 2004
  2. Cliff Wells

    Re: Compiled Byte code

    Cliff Wells, Oct 13, 2004, in forum: Python
    Replies:
    2
    Views:
    358
    Cliff Wells
    Oct 15, 2004
  3. eXt
    Replies:
    0
    Views:
    244
  4. lander
    Replies:
    5
    Views:
    625
    bruce barker
    Mar 5, 2008
  5. gelonida
    Replies:
    1
    Views:
    792
    Gabriel Genellina
    May 6, 2010
Loading...

Share This Page