Change between Python 2.3 and 2.4 under WinXP

Discussion in 'Python' started by Franz Steinhäusler, Mar 31, 2005.

  1. Hello,

    My second question from my last post (PyQt on Python 2.4), I think, is
    a little got under (i have installed both Python 2.3 and Python 2.4)

    Is there any possibility under WinXP, to alterntate quickly
    (with batch file or similary) between python23 and python24.


    Many thanks,
    --
    Franz Steinhäusler

    DrPython (Project Developer)
    http://mitglied.lycos.de/drpython/
    Franz Steinhäusler, Mar 31, 2005
    #1
    1. Advertising

  2. Franz Steinhäusler wrote:
    > Is there any possibility under WinXP, to alterntate quickly
    > (with batch file or similary) between python23 and python24.


    No need to change between them. Just install them both, and
    select which one to use on a per-invocation base. I.e. do

    c:\python23\python.exe foo.py
    c:\python24\python.exe foo.py

    If you are concerned that the .py association changes, you
    have two options:

    1. manually edit the registry. Under HKEY_CLASSES_ROOT,
    find Python.File (or Python.NoConFile), then shell\open\command,
    and switch between paths.
    2. install 2.4 and/or 2.3 under different user accounts, on
    a per-user basis (rather than the per-machine basis), and
    switch users. One of the installations can be per-machine,
    as per-user settings override the machine settings for the
    user.

    Regards,
    Martin
    =?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=, Mar 31, 2005
    #2
    1. Advertising

  3. Franz Steinhäusler

    Peter Hansen Guest

    Martin v. Löwis wrote:
    > Franz Steinhäusler wrote:
    >> Is there any possibility under WinXP, to alterntate quickly (with
    >> batch file or similary) between python23 and python24.


    > If you are concerned that the .py association changes, you
    > have two options:
    >
    > 1. manually edit the registry. Under HKEY_CLASSES_ROOT,
    > find Python.File (or Python.NoConFile), then shell\open\command,
    > and switch between paths.


    Or even quicker: write a batch file that calls the
    "ftype" command to change the registry setting.
    (I believe changes made with ftype are persistent,
    but haven't tested.)

    Use "ftype /?" at a prompt to learn more, and try
    "assoc .py" and "ftype Python.File" to learn more specifically
    about what these do for Python.

    -Peter
    Peter Hansen, Mar 31, 2005
    #3
  4. Franz Steinhäusler

    Cappy2112 Guest

    Do you really think this is a safe solution?
    How do you deal with features that are in new 2.4, but you invoke it
    with the exe from 2.3?

    The imports have to be handled as well, and the dlls, and the libs too
    Cappy2112, Mar 31, 2005
    #4
  5. Cappy2112 wrote:
    > Do you really think this is a safe solution?


    Not sure which of the three solutions I mentioned you are referring
    to as "this".

    > How do you deal with features that are in new 2.4, but you invoke it
    > with the exe from 2.3?


    If you want to have the script run with both Python 2.3 and 2.4, you
    should avoid using features new in 2.4. Alternatively, you can check
    for the presence of the feature, and fall back gracefully if the feature
    is missing.

    > The imports have to be handled as well, and the dlls, and the libs too


    Yes. Using different interpreter binaries (i.e. \python23\python.exe
    vs. \python24\python.exe) will automatically take care of this.
    Each interpreter binary will safely have its own Python path, use its
    own dlls, and its own libs.

    Regards,
    Martin
    =?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=, Apr 1, 2005
    #5
  6. Franz Steinhäusler wrote:

    > My second question from my last post (PyQt on Python 2.4), I think, is
    > a little got under (i have installed both Python 2.3 and Python 2.4)
    >
    > Is there any possibility under WinXP, to alterntate quickly
    > (with batch file or similary) between python23 and python24.


    if you want to deploy programs that depend on a specific python version,
    exemaker is your friend:

    http://effbot.org/zone/exemaker.htm

    </F>
    Fredrik Lundh, Apr 4, 2005
    #6
  7. Franz Steinhäusler

    Lucas Raab Guest

    Fredrik Lundh wrote:
    > Franz Steinhäusler wrote:
    >
    >
    >>My second question from my last post (PyQt on Python 2.4), I think, is
    >>a little got under (i have installed both Python 2.3 and Python 2.4)
    >>
    >>Is there any possibility under WinXP, to alterntate quickly
    >>(with batch file or similary) between python23 and python24.

    >
    >
    > if you want to deploy programs that depend on a specific python version,
    > exemaker is your friend:
    >
    > http://effbot.org/zone/exemaker.htm
    >
    > </F>
    >
    >
    >


    not to be biased toward your own products at all, or course :)

    --
    --------------------------
    Lucas Raab
    lvraab"@"earthlink.net
    dotpyFE"@"gmail.com
    AIM: Phoenix11890
    MSN: dotpyfe "@" gmail.com
    IRC: lvraab
    ICQ: 324767918
    Yahoo: Phoenix11890
    Lucas Raab, Apr 4, 2005
    #7
  8. Lucas Raab wrote:

    > not to be biased toward your own products at all, or course :)


    I'm not aware of any other tool that solves that specific problem.

    </F>
    Fredrik Lundh, Apr 4, 2005
    #8
  9. Fredrik Lundh wrote:

    > I'm not aware of any other tool that solves that specific problem.


    notepad does a fine job at creating batch files, IMO.

    Of course, it is not all that clear what the OP actually wanted.
    For all we know, he wanted to "alternate quickly (with batch
    file or similary) between python23 and python24". Taken in the
    literal sense, selecting different versions of python.exe in
    the start menu might be the fastest way of "alternating".

    Regards,
    Martin
    =?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=, Apr 5, 2005
    #9
  10. On Tue, 05 Apr 2005 01:53:25 +0200, "Martin v. Löwis"
    <> wrote:

    >Fredrik Lundh wrote:
    >
    >> I'm not aware of any other tool that solves that specific problem.

    >
    >notepad does a fine job at creating batch files, IMO.
    >
    >Of course, it is not all that clear what the OP actually wanted.
    >[...]


    Hi, here I am again, the OP :)

    I think, I considered the problem more complicated as it is in fact.

    Maybe a batch file (py23.bat: c:\python23\python.exe should be enough)

    thanks again!

    --
    Franz Steinhäusler
    http://drpython.sourceforge.net/
    http://mitglied.lycos.de/drpython/
    Franz Steinhaeusler, Apr 5, 2005
    #10
  11. Franz Steinhäusler

    rbt Guest

    Martin v. Löwis wrote:

    > Of course, it is not all that clear what the OP actually wanted.
    > For all we know, he wanted to "alternate quickly (with batch
    > file or similary) between python23 and python24"...


    Maybe off-topic for this thread, but I noticed that when installing
    2.4.1 that 2.4.0 is automatically removed. Does 2.4 do the same thing to
    2.3 versions?
    rbt, Apr 5, 2005
    #11
  12. rbt <> writes:

    > Martin v. Löwis wrote:
    >
    >> Of course, it is not all that clear what the OP actually wanted.
    >> For all we know, he wanted to "alternate quickly (with batch
    >> file or similary) between python23 and python24"...

    >
    > Maybe off-topic for this thread, but I noticed that when installing
    > 2.4.1 that 2.4.0 is automatically removed. Does 2.4 do the same thing
    > to 2.3 versions?


    No.

    2.4 and 2.3 (and other versions) can coexist.

    Thomas
    Thomas Heller, Apr 5, 2005
    #12
  13. rbt said unto the world upon 2005-04-05 08:39:
    > Martin v. Löwis wrote:
    >
    >> Of course, it is not all that clear what the OP actually wanted.
    >> For all we know, he wanted to "alternate quickly (with batch
    >> file or similary) between python23 and python24"...

    >
    >
    > Maybe off-topic for this thread, but I noticed that when installing
    > 2.4.1 that 2.4.0 is automatically removed. Does 2.4 do the same thing to
    > 2.3 versions?


    Hi,

    on a different thread

    <http://groups.google.ca/groups?hl=en&lr=&safe=off&selm=42353d7d%240%2419431%249b622d9e%40news.freenet.de>

    Martin said that only one 2.4 version at a time is supported due to
    there being only one python24.dll.

    But the msi install process now informs you of this (thanks Martin :)

    Best,

    Brian vdB
    Brian van den Broek, Apr 5, 2005
    #13
  14. "Martin v. Löwis" wrote:

    >> I'm not aware of any other tool that solves that specific problem.

    >
    > notepad does a fine job at creating batch files, IMO.


    have you used exemaker? have you compared the behaviour of the
    resulting executables to batch files using different environments, shells,
    and OS versions? or are you just guessing here?

    </F>
    Fredrik Lundh, Apr 5, 2005
    #14
  15. Fredrik Lundh wrote:
    > have you used exemaker? have you compared the behaviour of the
    > resulting executables to batch files using different environments, shells,
    > and OS versions? or are you just guessing here?


    I have invoked it once, but that was some time ago, and I did not do a
    full case study of all its capabilities. In particular, I don't use
    different environments, shells, or OS versions, so I cannot compare
    the behaviour of the executables under circumstances different from
    the ones on my machine(s). For the use cases that I guessed that the
    OP was referring to, a batch file should be sufficient (actually,
    the OP clarified that a "py23.bat" batch file was sufficient for
    his needs).

    Regards,
    Martin
    =?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=, Apr 5, 2005
    #15
    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. Alexander Stojakovic

    Integrated Security under Win2K and WinXP

    Alexander Stojakovic, Jan 15, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    313
    Alexander Stojakovic
    Jan 15, 2004
  2. Scott
    Replies:
    7
    Views:
    404
    =?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=
    Feb 17, 2005
  3. =?iso-8859-15?q?Berthold_H=F6llmann?=

    Python 2.4 under WinXP, free VC71 toolkit and VC6 libraries

    =?iso-8859-15?q?Berthold_H=F6llmann?=, Sep 27, 2005, in forum: Python
    Replies:
    6
    Views:
    320
    Fredrik Lundh
    Sep 28, 2005
  4. stef
    Replies:
    2
    Views:
    288
  5. Harry Zoroc
    Replies:
    0
    Views:
    477
    Harry Zoroc
    Dec 9, 2007
Loading...

Share This Page