[Python-ideas] Make py.exe default to Python 3

Zachary Ware zachary.ware+pyideas at gmail.com
Tue Mar 15 17:14:40 EDT 2016


On Tue, Mar 15, 2016 at 3:58 PM, Steve Dower <steve.dower at python.org> wrote:
> On 15Mar2016 1231, Random832 wrote:
>>
>> I think what might be most appropriate would be to have a "Python
>> Console" in the start menu (alongside the IDLE entry) which sources a
>> bat file to add the correct python version (and the scripts directory
>> for pip and easy_install) to that window's PATH, rather than installing
>> it in the global PATH, and users can learn to start the console from
>> that icon when they want to run python commands. Inspired by the fact
>> that e.g. Visual Studio has something that does the same.
>
>
> This is one of two solutions I'd be comfortable with.
>
> The other is to rename "py[w].exe" as "python[w].exe".

I've wondered about allowing the launcher to determine the Python it
should invoke by its own name.  That is, if the launcher is named
'python3.exe' it should behave as 'py -3'; 'python2.7.exe' should
behave as 'py -2.7'.  I wrote a patch to that effect a year or two ago
but never got it polished up enough to submit.  What about doing this,
and at launcher install time (or at 'repair installation' time) create
links for each found Python (and python2/python3 if they exist)?

-- 
Zach


More information about the Python-ideas mailing list