Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Change between Python 2.3 and 2.4 under WinXP

Reply
Thread Tools

Change between Python 2.3 and 2.4 under WinXP

 
 
Franz Steinhäusler
Guest
Posts: n/a
 
      03-31-2005
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/
 
Reply With Quote
 
 
 
 
=?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=
Guest
Posts: n/a
 
      03-31-2005
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
 
Reply With Quote
 
 
 
 
Peter Hansen
Guest
Posts: n/a
 
      03-31-2005
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
 
Reply With Quote
 
Cappy2112
Guest
Posts: n/a
 
      03-31-2005

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

 
Reply With Quote
 
=?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=
Guest
Posts: n/a
 
      04-01-2005
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
 
Reply With Quote
 
Fredrik Lundh
Guest
Posts: n/a
 
      04-04-2005
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>



 
Reply With Quote
 
Lucas Raab
Guest
Posts: n/a
 
      04-04-2005
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
 
Reply With Quote
 
Fredrik Lundh
Guest
Posts: n/a
 
      04-04-2005
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>



 
Reply With Quote
 
=?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=
Guest
Posts: n/a
 
      04-04-2005
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
 
Reply With Quote
 
Franz Steinhaeusler
Guest
Posts: n/a
 
      04-05-2005
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/
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
A router running under WinXP runs under Windows Vista too? Peter Wagner Wireless Networking 12 02-04-2008 11:02 PM
simplest install procedure for Python + packages under winXP ? stef Python 2 04-26-2007 02:11 PM
WinXP 64 .mp3 summary change to look like WinXP 32? Manquala Windows 64bit 4 01-15-2006 04:01 AM
Python 2.4 under WinXP, free VC71 toolkit and VC6 libraries =?iso-8859-15?q?Berthold_H=F6llmann?= Python 6 09-28-2005 07:41 AM
Help with C extensions under VC6 / WinXP and Python 2.4 Scott Python 7 02-17-2005 09:40 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57