Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Dev

Status of PEP 397 - Python launcher for Windows

 

 

Python dev RSS feed   Index | Next | Previous | View Threaded


skippy.hammond at gmail

Feb 17, 2012, 9:24 PM

Post #1 of 14 (412 views)
Permalink
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
_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com


brian at python

Feb 17, 2012, 9:37 PM

Post #2 of 14 (368 views)
Permalink
Re: Status of PEP 397 - Python launcher for Windows [In reply to]

On Fri, Feb 17, 2012 at 23:24, Mark Hammond <skippy.hammond [at] gmail> 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.
_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com


mhammond at skippinet

Feb 17, 2012, 9:45 PM

Post #3 of 14 (362 views)
Permalink
Re: Status of PEP 397 - Python launcher for Windows [In reply to]

On 18/02/2012 4:37 PM, Brian Curtin wrote:
> On Fri, Feb 17, 2012 at 23:24, Mark Hammond<skippy.hammond [at] gmail> 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
_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com


martin at v

Feb 18, 2012, 4:08 AM

Post #4 of 14 (351 views)
Permalink
Re: Status of PEP 397 - Python launcher for Windows [In reply to]

Zitat von Mark Hammond <skippy.hammond [at] gmail>:

> 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


_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com


skippy.hammond at gmail

Feb 18, 2012, 7:08 PM

Post #5 of 14 (345 views)
Permalink
Re: Status of PEP 397 - Python launcher for Windows [In reply to]

On 18/02/2012 11:08 PM, martin [at] v wrote:
>
> Zitat von Mark Hammond <skippy.hammond [at] gmail>:
>
>> 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
_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com


ncoghlan at gmail

Feb 18, 2012, 7:18 PM

Post #6 of 14 (358 views)
Permalink
Re: Status of PEP 397 - Python launcher for Windows [In reply to]

On Sun, Feb 19, 2012 at 1:08 PM, Mark Hammond <skippy.hammond [at] gmail> 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 [at] gmail   |   Brisbane, Australia
_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com


v+python at g

Feb 18, 2012, 7:35 PM

Post #7 of 14 (346 views)
Permalink
Re: Status of PEP 397 - Python launcher for Windows [In reply to]

On 2/17/2012 9:24 PM, Mark Hammond wrote:
> I've been using the implementation for a number of months now and I
> find it incredibly useful.

+1


martin at v

Feb 19, 2012, 12:41 AM

Post #8 of 14 (343 views)
Permalink
Re: Status of PEP 397 - Python launcher for Windows [In reply to]

> 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


_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com


p.f.moore at gmail

Feb 19, 2012, 1:03 AM

Post #9 of 14 (347 views)
Permalink
Re: Status of PEP 397 - Python launcher for Windows [In reply to]

On 19 February 2012 03:09, Mark Hammond <mhammond [at] skippinet> wrote:
> Thanks for the note Paul, but did you also mean to CC python-dev?

Yes, I did, sorry.

>
> On 18/02/2012 9:15 PM, Paul Moore wrote:
>>
>> On 18 February 2012 05:24, Mark Hammond<skippy.hammond [at] gmail>  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.
>>
>>
>> I use it all the time. It's extremely useful, and I wouldn't be without
>> it.
>>
>> [.OT: One interesting property I find useful - if you put an alias
>> "vpython=python.exe" in the ini file (no path to Python) then
>> #!vpython picks up whatever Python is on PATH - this can be very
>> useful if you use virtualenvs a lot and want to run a script with the
>> current virtualenv]
>>
>>> Thoughts or comments?
>>
>>
>> IIRC, one question was how to manage multiple installs - if I install
>> Python 3.3 and 3.4, both of which install py.exe, and then uninstall
>> one, what happens to py.exe. What if I then uninstall the second?
>> Reference count the launcher?
>>
>> If it were possible to package up the launcher installer with the
>> Python installer, but then install it as a separate item, that might
>> be best (it's what MS products seem to do a lot - install one, get ten
>> extra - I don't like the way MS do it, but it seems appropriate here).
>> This would also allow python.org to host a standalone version of the
>> installer which could be installed seamlessly for older versions.
>>
>> Paul
>
>
_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com


breamoreboy at yahoo

Feb 20, 2012, 7:54 AM

Post #10 of 14 (328 views)
Permalink
Re: Status of PEP 397 - Python launcher for Windows [In reply to]

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.

_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com


skippy.hammond at gmail

Feb 20, 2012, 3:48 PM

Post #11 of 14 (331 views)
Permalink
Re: Status of PEP 397 - Python launcher for Windows [In reply to]

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


_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com


breamoreboy at yahoo

Feb 20, 2012, 4:01 PM

Post #12 of 14 (335 views)
Permalink
Re: Status of PEP 397 - Python launcher for Windows [In reply to]

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.

_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com


vinay_sajip at yahoo

Feb 21, 2012, 7:50 AM

Post #13 of 14 (318 views)
Permalink
Re: Status of PEP 397 - Python launcher for Windows [In reply to]

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

_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com


skippy.hammond at gmail

Feb 21, 2012, 2:58 PM

Post #14 of 14 (316 views)
Permalink
Re: Status of PEP 397 - Python launcher for Windows [In reply to]

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
_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com

Python dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.