[issue6378] Patch to make 'idle.bat' run idle.pyw using appropriate Python interpreter (so 3.1's idle.bat does not accidently use python26.exe)

Sridhar Ratnakumar report at bugs.python.org
Mon Jun 29 22:45:22 CEST 2009


New submission from Sridhar Ratnakumar <sridharr at activestate.com>:

On Mon, 29 Jun 2009 09:56:53 -0700, Trent Mick <trentm at activestate.com>
wrote:

> Sridhar Ratnakumar wrote:
>> I installed ActivePython-3.1 to C:\Python31 but disabled the 
installer
>> option "Register as default Python" .. because, I use Python-2.6 by  
>> default.
>>
>> However, this disabling broke 3.1's IDLE. Clicking on 'idle.bat' or
>> 'idle.py' or 'idle.pyw' in C:\Python31\Lib\idle\ directory opens 
Python
>> 2.6's IDLE.
>>
>> Since the installer knows the path to Python - C:
\Python31\python.exe -
>> does it make sense to patch the idle.bat file to use this binary?
>
> IIRC there is a special NT batch file syntax that you can use do that
> idle.bat will look for python.exe in a relative path, so that you 
won't
> have to patch idle.bat after install (which would be a pain).
>
> Here, use this for idle.bat:
>
>    @echo off
>    set CURRDIR=%~dp0
>    start %CURRDIR%..\..\pythonw.exe idle.pyw
>
> Perhaps you could add a bug to core Python to change idle.bat to be 
that?
>
>
> Trent
>

----------
components: IDLE, Windows
files: idle-use-curr-py.patch
keywords: patch
messages: 89875
nosy: srid
severity: normal
status: open
title: Patch to make 'idle.bat' run idle.pyw using appropriate Python interpreter (so 3.1's idle.bat does not accidently use python26.exe)
type: behavior
versions: Python 2.6, Python 3.1
Added file: http://bugs.python.org/file14392/idle-use-curr-py.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue6378>
_______________________________________


More information about the Python-bugs-list mailing list