On 15 March 2016 at 04:47, Nick Coghlan
On 15 March 2016 at 09:01, Paul Moore
wrote: I apologise if I gave the impression in this thread that there's any sort of "official" change in advice on how to launch Python. As far as I know, there hasn't been.
You don't need to apologise in any case but that's not what I meant. Also I'm not disagreeing with your proposal to change the default behaviour of py.exe. It's not so much "official policy" that I was lamenting but just the way things have evolved. I don't think that anyone really intended to reach the current situation where the different OSes have diverged and there's no longer a clear uniform command line to run a Python script.
It's still "python" - that works regardless of version on Windows (with a suitably configured PATH), in virtual environments and in pyenv and conda environments (and probably in Enthought Canopy as well, but I haven't checked that). The only places where it doesn't work are:
* Windows without a properly configured PATH (and without a tool like vex or conda)
AFAICT the default behaviour of the Windows installer does not add Python to PATH. Correct me if I'm wrong as I haven't used it myself for some time but when I tell my students to "install Python 3.5" and then to type "python" in the terminal a lot of the Windows users come back to me with PATH problems (specifically that python was not added to PATH).
* accessing Python 3 on *nix systems (without a tool like vex, pyenv or conda)
On the *nix side of things, the long term objective is to get "python" to a point of being usable for the latter case, but there's still a lot of other things to be done before that's a realistic option (e.g. migrating system packages over to using their own dedicated binary or symlink, so "python" can be switched to point to something else without affecting system services).
Well that would initially improve things but what happens when python 4 comes around? Really I think that for something like this having major-versioned executables is a good idea. It's just a shame that it wasn't done consistently. -- Oscar