On 20/07/2011 1:00 AM, Paul Moore wrote:
On 19 July 2011 02:41, Vinay Sajip<vinay_sa...@yahoo.co.uk>  wrote:
The use of py from the command line is merely a convenience for developers (as
the PEP says) - it's better to rely on shebang lines together with settings in
the .ini to get the behaviour you want.

But it's a *huge* convenience for running multiple Python versions,
particularly as no existing Python versions install executables with
the version in the name (python3.exe, python3.2.exe, etc).And BAT
files aren't a suitable option (I'll rant about the issues with BAT
files if you want, but I recommend you don't ask :-))

Being able to say py -3, py -2.7, etc, rather than having to hack
PATH, create renamed copies of exes, etc, is arguably more of a
benefit to me than shebang support.

Ditto for me.

This may explain why I'd like to see a command-line means of invoking
custom commands. Something like py.exe looking at an initial argument,
and if it's of the form "-cmd" for a command in py.ini, then run that
command, passing remaining arguments just as for py -3. (Maybe --cmd
to match standard long option usage would be better?)

Presumably, if this idea is to go anywhere, it would need adding to
the PEP. Mark, do you think it would be useful?

I doubt I will find it useful - but I'm on record as saying I wont find the custom command support itself useful :) But similarly with that support, evidence that enough people *will* find it useful is enough for me to support the concept.

My current thinking re the PEP is to make it much smaller - just describe the concepts and try to avoid as much implementation detail as possible - I see no reason the PEP needs to take a stance on issues like that - this feature really could be treated just like any other feature request in Python - a loose consensus and acceptable patch is all that is needed.

Mark
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to