473,386 Members | 1,819 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Change between Python 2.3 and 2.4 under WinXP

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/
Jul 18 '05 #1
14 1609
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
Jul 18 '05 #2
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
Jul 18 '05 #3

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

Jul 18 '05 #4
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
Jul 18 '05 #5
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>

Jul 18 '05 #6
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
Jul 18 '05 #7
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>

Jul 18 '05 #8
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
Jul 18 '05 #9
On Tue, 05 Apr 2005 01:53:25 +0200, "Martin v. Löwis"
<ma****@v.loewis.de> 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/
Jul 18 '05 #10
rbt
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?
Jul 18 '05 #11
rbt <rb*@athop1.ath.vt.edu> 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
Jul 18 '05 #12
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%241943 1%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

Jul 18 '05 #13
"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>

Jul 18 '05 #14
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
Jul 18 '05 #15

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

59
by: Hugh Macdonald | last post by:
I've recently been trying out various different GUI frameworks in Python and was wondering if I could get your input on the pros and cons of the different ones... wxPython: I love the...
2
by: Eric Woudenberg | last post by:
I just installed a Python 2.3.4 Windows binary on a friend's WinXP machine (because the latest Cygwin-provided Python 2.3 build leaves out the winsound module for some reason). When I try and...
10
by: Simon John | last post by:
After quite a while of wxPython I'm getting back into PyQt, mainly due to the announcement by Trolltech that they will make a GPL version of Qt4 for Windows (and Phil-T said he will make a PyQt to...
7
by: Scott | last post by:
I've installed Python 2.4 under WinXP and am attempting to create an extension module using the steps outlined here: http://python.org/doc/2.4/ext/win-cookbook.html I'm specifically trying to...
2
by: guenais | last post by:
Hello When I use Pyparallel to access the parallel port in WinXP with Python I get an error saying that this is a priviledged instruction Any clue ? Mike
5
by: manokumar | last post by:
hiye, i notice that some if not all of my folders in winxp pro. are set as read only and its giving me some problem with development. so as the natural thing, i unchecked the read only option and...
3
by: Godzilla | last post by:
Has anyone install Python on Windows XP Embedded? We wish to evaluate the possible solution of installing Python with WinXPE on a PC/104 plus module. Thank you.
28
by: H J van Rooyen | last post by:
Hi, I want to write a small system that is transaction based. I want to split the GUI front end data entry away from the file handling and record keeping. Now it seems almost trivially easy...
2
by: stef | last post by:
hello, I'm still in the transition of going from MatLab to Scipy, and installed previous week a SciPy on a PC twice, through the new "Enstaller". It's a pitty that there will be no old...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.