在WinXP下改变Python 2.3和2.4 [英] Change between Python 2.3 and 2.4 under WinXP

查看:51
本文介绍了在WinXP下改变Python 2.3和2.4的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,


我的上一篇文章(Python 2.4上的PyQt)中的第二个问题,我认为,

a有点不足(我安装了) Python 2.3和Python 2.4)


在WinXP下是否有可能在python23和python24之间快速更改
(包含批处理文件或类似文件)。非常感谢,

-

Franz Steinh?usler


DrPython(项目开发人员)
http://mitglied.lycos.de/drpython/

解决方案

Franz Steinh?usler写道:

在WinXP下是否有任何可能性,快速改变
(批量)文件或类似的)python23和python24之间。




无需在它们之间进行更改。只需安装它们,并且

选择在每个调用基础上使用哪一个。即做


c:\ python23 \ python.exe foo.py

c:\ python24 \ python.exe foo.py


如果您担心.py关联发生变化,那么您需要两个选项:


1.手动编辑注册表。在HKEY_CLASSES_ROOT下,

找到Python.File(或Python.NoConFile),然后是shell \open \命令,

并在路径之间切换。

2.在不同的用户帐户下安装2.4和/或2.3,基于每个用户(而不是每台机器)的

a,以及

切换用户。其中一个安装可以是每台机器,

按用户设置覆盖

用户的机器设置。


问候,

Martin


Martin v.L?wis写道:

Franz Steinh?usler写道:< blockquote class =post_quotes>在WinXP下是否有可能在python23和python24之间快速改变(使用
批处理文件或类似文件)。


如果您担心.py关联更改,您有两个选择:

1.手动编辑注册表。在HKEY_CLASSES_ROOT下,
找到Python.File(或Python.NoConFile),然后shell \open \ command,
并在路径之间切换。




甚至更快:写一个调用

" ftype"的批处理文件。更改注册表设置的命令。

(我相信使用ftype进行的更改是持久的,

但是还没有测试过。)


使用ftype /?在提示中了解更多,并尝试

" assoc .py"和ftype Python.File更具体地了解

关于这些为Python做些什么。


-Peter




你真的认为这是一个安全的解决方案吗?

你如何处理新2.4中的功能,但你调用了它?

来自2.3的exe?

进口也必须处理,dll和libs也是如此


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 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


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



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


这篇关于在WinXP下改变Python 2.3和2.4的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆