Software Compatable with other versions?

Discussion in 'Python' started by Michael Yanowitz, Nov 21, 2006.

  1. Hello:

    I am still using Python 2.4.3, I haven't upgraded yet.
    However, I would like to know if my 2.4.3 programs will run
    in 2.5 without modification.
    Is there any way to test that my software is compatable
    with 2.5 (or any other version), without actually installing
    that version?:

    I have been told that the .pyc are not compatable. Is it
    possible, to convert a 2.4.x .pyc to a 2.5 .pyc?

    Thanks in advance:
    Michael Yanowitz
     
    Michael Yanowitz, Nov 21, 2006
    #1
    1. Advertisements

  2. Michael Yanowitz

    Guest

    On Nov 21, 7:24 am, "Michael Yanowitz" <> wrote:
    > I am still using Python 2.4.3, I haven't upgraded yet.
    > However, I would like to know if my 2.4.3 programs will run
    > in 2.5 without modification.
    > Is there any way to test that my software is compatable
    > with 2.5 (or any other version), without actually installing
    > that version?:

    You need to install 2.5. If you're on linux or similar OS, get the
    source and
    do
    ./configure
    make altinstall
    This installs almost everything, but does not overwrite your link to
    2.4.3.

    Then you can test your code using
    python2.5 myfile.py

    When you're all set, just change the link "python" to point to the new
    python2.5.

    > I have been told that the .pyc are not compatable. Is it
    > possible, to convert a 2.4.x .pyc to a 2.5 .pyc?


    Very unlikely.
    -- George Young

    > Thanks in advance:
    > Michael Yanowitz
     
    , Nov 21, 2006
    #2
    1. Advertisements

  3. a écrit :
    > On Nov 21, 7:24 am, "Michael Yanowitz" <> wrote:
    >> I am still using Python 2.4.3, I haven't upgraded yet.
    >> However, I would like to know if my 2.4.3 programs will run
    >> in 2.5 without modification.
    >> Is there any way to test that my software is compatable
    >> with 2.5 (or any other version), without actually installing
    >> that version?:

    > You need to install 2.5. If you're on linux or similar OS, get the
    > source and
    > do
    > ./configure
    > make altinstall
    > This installs almost everything, but does not overwrite your link to
    > 2.4.3.
    >
    > Then you can test your code using
    > python2.5 myfile.py
    >
    > When you're all set, just change the link "python" to point to the new
    > python2.5.


    Hum, IMHO it's a bad idea to change the python link to another Python
    version (other than de distro default).

    Can put the Python version in script header (and make it executable)
    #!/bin/env python2.5

    Can write a small script shell starting the Python script with the
    ad-hoc Python version.

    >> I have been told that the .pyc are not compatable. Is it
    >> possible, to convert a 2.4.x .pyc to a 2.5 .pyc?


    The magic code.

    Just rm -rf *.pyc from your own scripts directories, they will be rebuilt.

    A+

    Laurent.
     
    Laurent Pointal, Nov 21, 2006
    #3
  4. Michael Yanowitz

    Georg Brandl Guest

    Michael Yanowitz schrieb:
    > Hello:
    >
    > I am still using Python 2.4.3, I haven't upgraded yet.
    > However, I would like to know if my 2.4.3 programs will run
    > in 2.5 without modification.
    > Is there any way to test that my software is compatable
    > with 2.5 (or any other version), without actually installing
    > that version?:
    >
    > I have been told that the .pyc are not compatable. Is it
    > possible, to convert a 2.4.x .pyc to a 2.5 .pyc?


    No. Why should there if there's such an easy way to build it
    from scratch?

    Georg
     
    Georg Brandl, Nov 21, 2006
    #4
  5. Michael Yanowitz

    Tim Chase Guest

    >>> I have been told that the .pyc are not compatable. Is it
    >>> possible, to convert a 2.4.x .pyc to a 2.5 .pyc?

    >
    > The magic code.
    >
    > Just rm -rf *.pyc from your own scripts directories, they will
    > be rebuilt.


    Just take care in the event that you have files that were
    distributed in bytecode format (.pyc) rather than source
    form...if you don't have any such .pyc files, then Laurent's
    solution is fast and easy. If you do, you may have to protect
    them before trying such a stunt.

    -tkc
     
    Tim Chase, Nov 21, 2006
    #5
    1. Advertisements

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. paul
    Replies:
    6
    Views:
    391
  2. RCriddle

    Not compatable with anything!!!

    RCriddle, Nov 25, 2003, in forum: HTML
    Replies:
    0
    Views:
    420
    RCriddle
    Nov 25, 2003
  3. RCriddle

    Not compatable with anything!!!

    RCriddle, Nov 25, 2003, in forum: HTML
    Replies:
    4
    Views:
    513
    RCriddle
    Nov 25, 2003
  4. SATAN
    Replies:
    13
    Views:
    675
    Toby Inkster
    Aug 11, 2004
  5. Carol Dearborn
    Replies:
    2
    Views:
    1,157
    Richard
    Nov 29, 2004
Loading...

Share This Page