Status of PEP 397 - Python launcher for Windows
I'm wondering what thoughts are on PEP 397, the Python launcher for Windows. I've been using the implementation for a number of months now and I find it incredibly useful. To my mind, the specific steps would be: * Have someone pronounce it as accepted (or suggest steps to be taken before such a pronouncement). I can't recall the current process - does Guido have to pronounce personally or formally delegate to a czar? * Move the source into the Python tree and update the build process. * Arrange for it to be installed with the next release of 3.2 and all future versions - I'm happy to try and help with that, but will probably need some help from Martin. * Write some user-oriented docs. Thoughts or comments? Mark
On Fri, Feb 17, 2012 at 23:24, Mark Hammond <skippy.hammond@gmail.com> wrote:
I'm wondering what thoughts are on PEP 397, the Python launcher for Windows. I've been using the implementation for a number of months now and I find it incredibly useful.
To my mind, the specific steps would be:
* Arrange for it to be installed with the next release of 3.2 and all future versions - I'm happy to try and help with that, but will probably need some help from Martin.
I've been doing some installer work lately and would be willing to help out if I can.
Thoughts or comments?
Will you be at PyCon, specifically at the language summit? I proposed a side-track to discuss this PEP, and I say side-track since a great majority of the group are not Windows users, so I don't think it's a topic to bring before the entire group.
On 18/02/2012 4:37 PM, Brian Curtin wrote:
On Fri, Feb 17, 2012 at 23:24, Mark Hammond<skippy.hammond@gmail.com> wrote:
I'm wondering what thoughts are on PEP 397, the Python launcher for Windows. I've been using the implementation for a number of months now and I find it incredibly useful.
To my mind, the specific steps would be:
* Arrange for it to be installed with the next release of 3.2 and all future versions - I'm happy to try and help with that, but will probably need some help from Martin.
I've been doing some installer work lately and would be willing to help out if I can.
Great.
Thoughts or comments?
Will you be at PyCon, specifically at the language summit? I proposed a side-track to discuss this PEP, and I say side-track since a great majority of the group are not Windows users, so I don't think it's a topic to bring before the entire group.
Unfortunately not, but if you can get a few people together to discuss this, I'm happy to wait and see what consensus they arrive at. Cheers, Mark
Zitat von Mark Hammond <skippy.hammond@gmail.com>:
I'm wondering what thoughts are on PEP 397, the Python launcher for Windows. I've been using the implementation for a number of months now and I find it incredibly useful.
I wonder what the rationale for the PEP (as opposed to the rationale for the launcher) is - why do you need to have a PEP for it? As written, it specifies some "guidelines" that some software package of yours might adhere to. You don't need a PEP for that, just write the software and adhere to the guidelines, possibly putting them into the documentation. A PEP needs to have controversial issues, or else there would not have been a point in writing it in the first place. Also, it needs to concern CPython, or the Python language, else it does not need to be a *P*EP. To be a proper PEP, you need to include these things: - what is the action that you want to see taken? - what is the Python version (or versions) that you want to see the action taken for? - what alternative actions have been proposed, and what are (in your opinion, and the opinion of readers) pros and cons of each action? Assuming you are proposing some future action for CPython, I'm opposed to the notion that the implementation of the launcher is the specification. The specification needs to be in the PEP. It may leave room, in which case the remaining details need to be specified in the documentation. A critical question (IMO) is the question how the launcher gets onto systems. Will people have to download and install it themselves, or will it come as part of some Python distribution? If it comes with the Python distribution, how get multiple copies of the launcher coordinated? Also: what's the name of the launcher? How can I actually use it? Regards, Martin
On 18/02/2012 11:08 PM, martin@v.loewis.de wrote:
Zitat von Mark Hammond <skippy.hammond@gmail.com>:
I'm wondering what thoughts are on PEP 397, the Python launcher for Windows. I've been using the implementation for a number of months now and I find it incredibly useful.
I wonder what the rationale for the PEP (as opposed to the rationale for the launcher) is - why do you need to have a PEP for it? As written, it specifies some "guidelines" that some software package of yours might adhere to. You don't need a PEP for that, just write the software and adhere to the guidelines, possibly putting them into the documentation.
A PEP needs to have controversial issues, or else there would not have been a point in writing it in the first place. Also, it needs to concern CPython, or the Python language, else it does not need to be a *P*EP.
The launcher was slightly controversial when the pep was initially written 12 months ago. If you believe the creation of the PEP was procedurally incorrect I'm happy to withdraw it - obviously I just want the launcher, with or without a PEP. Alternatively, if you think the format of the PEP needs to change before it can be accepted, then I'm happy to do that too if you can be very specific about what you want changed. If you mean something else entirely then please be very specific - I admit I'm not clear on the point of your message at all.
To be a proper PEP, you need to include these things: - what is the action that you want to see taken? - what is the Python version (or versions) that you want to see the action taken for? - what alternative actions have been proposed, and what are (in your opinion, and the opinion of readers) pros and cons of each action?
Assuming you are proposing some future action for CPython, I'm opposed to the notion that the implementation of the launcher is the specification. The specification needs to be in the PEP. It may leave room, in which case the remaining details need to be specified in the documentation.
I'm really not sure what you are trying to say here. That the PEP should remove all references to an implementation specification, or that the PEP simply should be withdrawn? As above, I don't care - I just want the launcher with the least amount of bureaucracy possible.
A critical question (IMO) is the question how the launcher gets onto systems. Will people have to download and install it themselves, or will it come as part of some Python distribution?
This is addressed in the PEP: "The launcher will be distributed with all future versions of Python ..."
If it comes with the Python distribution, how get multiple copies of the launcher coordinated?
This may not be specified as well as it could, but: "Future versions of the launcher should remain backwards compatible with older versions, so later versions of Python can install an updated version of the launcher without impacting how the previously installed version of the launcher is used."
Also: what's the name of the launcher? How can I actually use it?
This too is there: "The console launcher will be named 'py.exe' and the Windows one named 'pyw.exe'" and there is discussion of the command-line args. Mark
On Sun, Feb 19, 2012 at 1:08 PM, Mark Hammond <skippy.hammond@gmail.com> wrote:
The launcher was slightly controversial when the pep was initially written 12 months ago. If you believe the creation of the PEP was procedurally incorrect I'm happy to withdraw it - obviously I just want the launcher, with or without a PEP. Alternatively, if you think the format of the PEP needs to change before it can be accepted, then I'm happy to do that too if you can be very specific about what you want changed. If you mean something else entirely then please be very specific - I admit I'm not clear on the point of your message at all.
I think the PEP is appropriate, but some of the details that are currently embedded in the prose should be extracted out to a clear "specification" section: - two launcher binaries (one for .py files, one for .pyw) will be added to the system PATH - the launcher will be shipped as part of the default CPython windows installers (starting with Python 3.3) - the launcher will handle launching both Python 2 and Python 3 scripts - the launcher will be overwritten when upgrading CPython As a practical matter, it *may* be worth having the launcher available as an independent installer that just gets bundled with the CPython one, but that shouldn't be a requirement in the PEP. Cheers, Nick. -- Nick Coghlan | ncoghlan@gmail.com | Brisbane, Australia
The launcher was slightly controversial when the pep was initially written 12 months ago.
So what were the objections?
Assuming you are proposing some future action for CPython, I'm opposed to the notion that the implementation of the launcher is the specification. The specification needs to be in the PEP. It may leave room, in which case the remaining details need to be specified in the documentation.
I'm really not sure what you are trying to say here.
Let me try again: I dislike the phrase "written in C, which defines the detailed implementation". That means that in order to find out what the launcher does, you have to read its source code. I also dislike the phrase "but instead to offer guidelines the launcher should adhere to"; the PEP should not just be guidelines, but a clear, prescriptive specification. I admit that I had difficulties to find the places in the PEP where it specifies things, as opposed to explaining things. It seems that all of the sections - An overview of the launcher. - Guidelines for a Python launcher. - Shebang line parsing - Virtual commands in shebang lines: - Customized Commands: - Python Version Qualifiers - Command-line handling - Process Launching are specification, so it may help to group them as subsections of a top-level heading "Specification". OTOH, "Process Launching" has 4 paragraphs of discussion, then two sentences of specification, then 1,5 sentences of discussion. I wish it was easier to find out what the PEP actually says.
That the PEP should remove all references to an implementation specification, or that the PEP simply should be withdrawn?
Having references to the implementation is fine; saying that you have to read the code to understand what it does, and that the code takes precedence over the PEP is not.
If it comes with the Python distribution, how get multiple copies of the launcher coordinated?
This may not be specified as well as it could, but: "Future versions of the launcher should remain backwards compatible with older versions, so later versions of Python can install an updated version of the launcher without impacting how the previously installed version of the launcher is used."
That's not really my concern. I didn't originally find the place where it said that the launcher goes into the Windows directory. Now that I see it: how do you prevent deinstallation of py.exe when some version of Python is uninstalled, but other versions remain? Regards, Martin
On 18/02/2012 05:24, Mark Hammond wrote:
I'm wondering what thoughts are on PEP 397, the Python launcher for Windows. I've been using the implementation for a number of months now and I find it incredibly useful.
To my mind, the specific steps would be:
* Have someone pronounce it as accepted (or suggest steps to be taken before such a pronouncement). I can't recall the current process - does Guido have to pronounce personally or formally delegate to a czar?
* Move the source into the Python tree and update the build process.
* Arrange for it to be installed with the next release of 3.2 and all future versions - I'm happy to try and help with that, but will probably need some help from Martin.
* Write some user-oriented docs.
The section in the docs "Using Python on Windows" would need to be updated, but would this have to happen for every current version of Python? The docs here https://bitbucket.org/vinay.sajip/pylauncher/src/tip/Doc/launcher.rst are in my view possibly overkill, what do the rest of you think? The ouput from py --help seems fine but nothing happens when pyw --help is entered, is this by accident or design?
Thoughts or comments?
Mark
A cracking bit of kit :) -- Cheers. Mark Lawrence.
On 21/02/2012 2:54 AM, Mark Lawrence wrote:
On 18/02/2012 05:24, Mark Hammond wrote: ...
* Write some user-oriented docs.
The section in the docs "Using Python on Windows" would need to be updated, but would this have to happen for every current version of Python?
I'm not sure what docs you are referring to here?
The docs here https://bitbucket.org/vinay.sajip/pylauncher/src/tip/Doc/launcher.rst are in my view possibly overkill, what do the rest of you think?
Even though I had no input into those docs, I actually think they are fairly good and can't see what should be dropped. It may make sense to split the docs so there is a separate "advanced" doc page. Further, I think there is something that could be added to those docs - the use of PATHEXT and the fact that once the shebang line is in place, a command-prompt could do just "hello.py" rather than needing "py hello.py".
The ouput from py --help seems fine but nothing happens when pyw --help is entered, is this by accident or design?
I guess "accident" - or more accurately, the lack of doing anything special. It could be useful to have that display a message box with the usage - while that would break "pyw --help > out.txt", I doubt that really is useful for anyone. Alternatively, instead of trying to display all the usage in "pyw --help", it could display a short message indicating what the program is for and refer to "py.exe --help" for more information. Possibly a plain "pyw" (with no args) could do the same thing - nothing useful happens in that case either.
Thoughts or comments?
Mark
A cracking bit of kit :)
Thanks! Vinay's implementation is great, I agree. Thanks, Mark
On 20/02/2012 23:48, Mark Hammond wrote:
On 21/02/2012 2:54 AM, Mark Lawrence wrote:
The section in the docs "Using Python on Windows" would need to be updated, but would this have to happen for every current version of Python?
I'm not sure what docs you are referring to here?
See http://docs.python.org/using/windows.html
Mark
-- Cheers. Mark Lawrence.
Mark Hammond <skippy.hammond <at> gmail.com> writes:
think there is something that could be added to those docs - the use of PATHEXT and the fact that once the shebang line is in place, a command-prompt could do just "hello.py" rather than needing "py hello.py".
Or even just "hello" should work. Regards, Vinay Sajip
On 22/02/2012 2:50 AM, Vinay Sajip wrote:
Mark Hammond<skippy.hammond<at> gmail.com> writes:
think there is something that could be added to those docs - the use of PATHEXT and the fact that once the shebang line is in place, a command-prompt could do just "hello.py" rather than needing "py hello.py".
Or even just "hello" should work.
Ooops - right. IIRC, "hello.py" will work without anything special in PATHEXT and just "hello" would work with a modified PATHEXT. Mark
participants (8)
-
Brian Curtin -
Glenn Linderman -
Mark Hammond -
Mark Hammond -
Mark Lawrence -
martin@v.loewis.de -
Nick Coghlan -
Vinay Sajip