[python-win32] completely removing python from windows

Vernon Cole vernondcole at gmail.com
Mon Nov 9 15:59:15 CET 2009


I believe that if you re-install 2.6 you will find that the definition of
"python" will be changed by the installer.  I typically have four or five
versions of python on my workstation, and I run in to this problem
frequently. So I usually put a "python.bat" file in a utility folder (which
is relatively early in my search path) so that it will point to which ever
version I want to be my "default" python for the day.

<code for C:\utils\python.bat>
C:\Python26\python.exe %1 %2 %3 %4 %5
<\code>

Python utilities which may be version dependent can benefit from similar
treatment:

<code for C:\utils\2to3.bat>
C:\Python26\python.exe C:\Python26\tools\scripts\2to3.py %1 %2 %3 %4 %5 %6
%7 %8 %9
<\code>

<code for C:\utils\ped.bat>
start C:\Python26\Lib\site-packages\pythonwin\pythonwin.exe %1 %2 %3 %4 %5
</code>

That way, if I type "ped myPythonScript.py" on the command line, I will get
the correct IDE.  On the other hand, if I right-click on "myPythonScript.py"
and select "Edit", I will get the IDE for which ever version of Python I
installed most recently, usually a 3.x version, which may make it rather
difficult to debug a Python 2.x script.  ;-)

HTH
Vernon Cole

P.S.:
I keep all of my imitation gnu command line tools (like "tail", "touch",
"less", etc.) in that same utility folder.

On Mon, Nov 9, 2009 at 5:39 AM, Ronny Herzog <herzog at mpi-cbg.de> wrote:

> Dear users,
>
> I want to remove Python 2.5 from my Windows Vista in favor of Python 2.6. I
> installed 2.6 already and used the Python2.5 uninstaller to remove the old
> version. But when I type 'python' in the command line, the Python 2.5 shell
> is opened.
>
> What do I have to do to completely remove the old Python? It is important
> for my work.
>
> thank you and regards,
> Ronny
>
> _______________________________________________
> python-win32 mailing list
> python-win32 at python.org
> http://mail.python.org/mailman/listinfo/python-win32
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20091109/19352d75/attachment.htm>


More information about the python-win32 mailing list