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

Paul Moore p.f.moore at gmail.com
Tue Mar 15 17:10:26 EDT 2016


On 15 March 2016 at 20:58, 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'm very conscious that as an experienced user, I don't actually care
what the installer does, as I'll reconfigure things the way I want
anyway.

However, in my opinion, the worst part of having a "Python command
prompt" start menu item is that it assumes everyone wants to use
cmd.exe. But there's also powershell users to consider. Furthermore,
having a command prompt that does what you want doesn't help people
who want to run Python from something like a scheduled task. Of
course, for Python it's no issue, as you can use the full path to the
interpreter and that's fine - I learned my dislike of this technique
from Visual Studio, where it's not that simple...

I'm not sure renaming py.exe as python.exe is such a good idea either.
I don't have a strong reason to give, just a suspicion that the subtly
different arguments, and the fact that it (by design) doesn't respect
PATH, make me concerned that it'll cause even more subtle issues than
the current approach. Also, it's not possible for users with their own
approaches to "opt out", where a PATH setting can be altered by the
user.

Anyway, as I say, I'll probably stick to doing things my own way
whatever happens.

Paul


More information about the Python-ideas mailing list