[Python-ideas] Possible Enhancement to py.exe Python Launcher

Paul Moore p.f.moore at gmail.com
Thu Nov 23 04:53:48 EST 2017

If I understand your proposal correctly, this is already possible, see

The details are likely a little different than what you're proposing,
but if they don't cover what you're trying to do, maybe you could give
a more specific example of a use case that isn't currently possible?


On 23 November 2017 at 08:43, Steve Barnes <gadgetsteve at live.co.uk> wrote:
> Following on from the discussions on pip I would like to suggest, (and
> possibly implement), a minor change to the current py.exe python launcher.
> Currently the launcher, when called without a version specifier,
> defaults to the highest version on the basis of 3>2, x.11 > x.9, -64 >
> -32 however this may not always be the most desirable behaviour.
> I would like to suggest that it take a configuration value for the
> default version to use, (and possibly a separate ones for pyw, & file
> associations), honouring the following with the later overriding:
> default - as current
> system setting - from registry
> user setting - from registry
> user setting - from config file maybe %appdata%\pylauncher\defaults.ini
> environment setting - from getenv
> local setting - from .pyconfig file in the current directory.
> Options would be the same format as the -X[.Y][-BB] format currently
> accepted on the command line plus a --No-Py-Default option which would
> always error out if the version to invoke was not specified.
> I see this as potentially adding quite a lot of value for people with
> multiple python versions installed and it could tie in quite well with
> the possible use of py.exe as an entry point for tools such as pip.
> It might also increase the awareness of the launcher as those who have
> to stick with python 2 for the moment or in a specific context could set
> the default to what they need but can always override.
> --
> Steve (Gadget) Barnes
> Any opinions in this message are my personal opinions and do not reflect
> those of my employer.
> ---
> This email has been checked for viruses by AVG.
> http://www.avg.com
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/

More information about the Python-ideas mailing list