Thanks Paul, I had missed that section of PEP-0397 - the only options that are not covered are loading a local configuration from the current directory and the option to set a prompt/error if the python version is not specified on the command line or in the shebang.
Sorry for the noise! Steve On 23/11/2017 09:53, Paul Moore wrote: > If I understand your proposal correctly, this is already possible, see > https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.python.org%2Fdev%2Fpeps%2Fpep-0397%2F%23python-version-qualifiers&data=02%7C01%7Cgadgetsteve%40live.co.uk%7C6e858560c6504120febe08d532581be5%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636470276358104937&sdata=mgZCUtbRoEU6A0JHMoI1kvC49kPkWy7TYP6LgmCUCn0%3D&reserved=0 > > 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? > > Paul > > On 23 November 2017 at 08:43, Steve Barnes <gadgetst...@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. >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.avg.com&data=02%7C01%7Cgadgetsteve%40live.co.uk%7C6e858560c6504120febe08d532581be5%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636470276358104937&sdata=QPEFfMHbB9ez60d%2F7dMcf59kvooIz0WBfCpHFseti4M%3D&reserved=0 >> >> _______________________________________________ >> Python-ideas mailing list >> Python-ideas@python.org >> https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmail.python.org%2Fmailman%2Flistinfo%2Fpython-ideas&data=02%7C01%7Cgadgetsteve%40live.co.uk%7C6e858560c6504120febe08d532581be5%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636470276358104937&sdata=DacUrxgfyFgQCf0DLPy5IQUeN%2BhRrW3tVXjkjLKfXz0%3D&reserved=0 >> Code of Conduct: >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fpython.org%2Fpsf%2Fcodeofconduct%2F&data=02%7C01%7Cgadgetsteve%40live.co.uk%7C6e858560c6504120febe08d532581be5%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636470276358104937&sdata=dP1wkYgGYSpyP3M7QmRA7mlVt0O6HJIvIowh7UlX0vQ%3D&reserved=0 -- 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@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/