Re: [Python-Dev] Request for Pronouncement: PEP 441 - Improving Python ZIP Application Support

2016-03-11 Thread anais timaure
Por favor quiero descargar este programa para mi teléfono Windows 8 Anais'Timaure♡___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archi

Re: [Python-Dev] Request for Pronouncement: PEP 441 - Improving Python ZIP Application Support

2015-03-15 Thread Nick Coghlan
Huzzah! Thanks for working on this one folks, it should make the zipfile execution support much easier for current and future Python users to discover :) Cheers, Nick. ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/list

Re: [Python-Dev] Request for Pronouncement: PEP 441 - Improving Python ZIP Application Support

2015-03-13 Thread Brett Cannon
On Sun, Mar 8, 2015 at 10:35 AM Brett Cannon wrote: > > On Sun, Mar 8, 2015, 08:40 Paul Moore wrote: > > On 26 February 2015 at 21:48, Paul Moore wrote: > > On 26 February 2015 at 21:34, Guido van Rossum wrote: > >> Accepted! > >> > >> Thanks for your patience, Paul, and thanks everyone for t

Re: [Python-Dev] Request for Pronouncement: PEP 441 - Improving Python ZIP Application Support

2015-03-08 Thread Brett Cannon
On Sun, Mar 8, 2015, 08:40 Paul Moore wrote: On 26 February 2015 at 21:48, Paul Moore wrote: > On 26 February 2015 at 21:34, Guido van Rossum wrote: >> Accepted! >> >> Thanks for your patience, Paul, and thanks everyone for their feedback. >> >> I know there are still a few small edits to the

Re: [Python-Dev] Request for Pronouncement: PEP 441 - Improving Python ZIP Application Support

2015-03-08 Thread Paul Moore
On 26 February 2015 at 21:48, Paul Moore wrote: > On 26 February 2015 at 21:34, Guido van Rossum wrote: >> Accepted! >> >> Thanks for your patience, Paul, and thanks everyone for their feedback. >> >> I know there are still a few small edits to the PEP, but those don't affect >> my acceptance. Co

Re: [Python-Dev] Request for Pronouncement: PEP 441 - Improving Python ZIP Application Support

2015-02-26 Thread Paul Moore
On 26 February 2015 at 21:34, Guido van Rossum wrote: > Accepted! > > Thanks for your patience, Paul, and thanks everyone for their feedback. > > I know there are still a few small edits to the PEP, but those don't affect > my acceptance. Congrats! Excellent, thanks to everyone for the helpful co

Re: [Python-Dev] Request for Pronouncement: PEP 441 - Improving Python ZIP Application Support

2015-02-26 Thread Guido van Rossum
Accepted! Thanks for your patience, Paul, and thanks everyone for their feedback. I know there are still a few small edits to the PEP, but those don't affect my acceptance. Congrats! --Guido On Thu, Feb 26, 2015 at 9:05 AM, Paul Moore wrote: > On 24 February 2015 at 18:24, Guido van Rossum w

Re: [Python-Dev] Request for Pronouncement: PEP 441 - Improving Python ZIP Application Support

2015-02-26 Thread Paul Moore
On 26 February 2015 at 18:23, Ethan Furman wrote: > On 02/26/2015 09:28 AM, Glenn Linderman wrote: >> On 2/26/2015 9:05 AM, Paul Moore wrote: > >>> ``create_archive(source, target=None, interpreter=None, main=None)`` >>> >>> >>>

Re: [Python-Dev] Request for Pronouncement: PEP 441 - Improving Python ZIP Application Support

2015-02-26 Thread Paul Moore
On 26 February 2015 at 17:28, Glenn Linderman wrote: > * The name of a directory, in which case a new application archive > will be created from the content of that directory. > * The name of an existing application archive file, in which case the > file is copied to the target. The file name

Re: [Python-Dev] Request for Pronouncement: PEP 441 - Improving Python ZIP Application Support

2015-02-26 Thread Ethan Furman
On 02/26/2015 09:28 AM, Glenn Linderman wrote: > On 2/26/2015 9:05 AM, Paul Moore wrote: >> ``create_archive(source, target=None, interpreter=None, main=None)`` >> >> >> Create an application archive from *source*. The source ca

Re: [Python-Dev] Request for Pronouncement: PEP 441 - Improving Python ZIP Application Support

2015-02-26 Thread Glenn Linderman
On 2/26/2015 9:05 AM, Paul Moore wrote: On 24 February 2015 at 18:24, Guido van Rossum wrote: Here's my review. I really like where this is going but I have a few questions and suggestions (I can't help myself :-). OK, I've updated both the PEP and the patch based on follow-up discussions. I t

Re: [Python-Dev] Request for Pronouncement: PEP 441 - Improving Python ZIP Application Support

2015-02-26 Thread Paul Moore
On 24 February 2015 at 18:24, Guido van Rossum wrote: > Here's my review. I really like where this is going but I have a few > questions and suggestions (I can't help myself :-). OK, I've updated both the PEP and the patch based on follow-up discussions. I think (again!) it is ready to go. I've

Re: [Python-Dev] Request for Pronouncement: PEP 441 - Improving Python ZIP Application Support

2015-02-25 Thread Paul Moore
On 25 February 2015 at 20:12, Jim J. Jewett wrote: > On Wed, Feb 25, 2015 at 2:33 PM, Paul Moore wrote: >> On 25 February 2015 at 17:06, Paul Moore wrote: > >> I've included the resulting API >> documentation below. It looks pretty good to me. > > Me too. I have a few nits anyhow. > >> .. funct

Re: [Python-Dev] Request for Pronouncement: PEP 441 - Improving Python ZIP Application Support

2015-02-25 Thread Jim J. Jewett
On Wed, Feb 25, 2015 at 2:33 PM, Paul Moore wrote: > On 25 February 2015 at 17:06, Paul Moore wrote: > I've included the resulting API > documentation below. It looks pretty good to me. Me too. I have a few nits anyhow. > .. function:: create_archive(directory, target=None, interpreter=None,

Re: [Python-Dev] Request for Pronouncement: PEP 441 - Improving Python ZIP Application Support

2015-02-25 Thread Barry Warsaw
On Feb 25, 2015, at 07:33 PM, Paul Moore wrote: >The module defines two convenience functions: > > >.. function:: create_archive(directory, target=None, interpreter=None, >main=None) > > Create an application archive from *source*. The source can be any > of the following: I think you meant

Re: [Python-Dev] Request for Pronouncement: PEP 441 - Improving Python ZIP Application Support

2015-02-25 Thread Brett Cannon
On Wed, Feb 25, 2015 at 2:33 PM Paul Moore wrote: > On 25 February 2015 at 17:06, Paul Moore wrote: > >> Is the difference between create and copy important? e.g., is there > >> anything wrong with > >> > >> create_archive(old_archive, output=new_archive) working as well as > >> create_archive(

Re: [Python-Dev] Request for Pronouncement: PEP 441 - Improving Python ZIP Application Support

2015-02-25 Thread Paul Moore
On 25 February 2015 at 17:06, Paul Moore wrote: >> Is the difference between create and copy important? e.g., is there >> anything wrong with >> >> create_archive(old_archive, output=new_archive) working as well as >> create_archive(directory, archive)? > > Probably not, now. The semantics have c

Re: [Python-Dev] Request for Pronouncement: PEP 441 - Improving Python ZIP Application Support

2015-02-25 Thread Paul Moore
On 25 February 2015 at 16:02, Jim J. Jewett wrote: > On 24 February 2015 at 18:58, Guido van Rossum wrote: >> The naming of the functions feels inconsistent -- maybe pack(directory, >> target) -> create_archive(directory, archive), and set_interpreter() -> >> copy_archive(archive, new_archive)? >

Re: [Python-Dev] Request for Pronouncement: PEP 441 - Improving Python ZIP Application Support

2015-02-25 Thread Jim J. Jewett
On 24 February 2015 at 18:58, Guido van Rossum wrote: > The naming of the functions feels inconsistent -- maybe pack(directory, > target) -> create_archive(directory, archive), and set_interpreter() -> > copy_archive(archive, new_archive)? Paul Moore wrote: > One possible source of confusion w

Re: [Python-Dev] Request for Pronouncement: PEP 441 - Improving Python ZIP Application Support

2015-02-25 Thread Paul Moore
On 24 February 2015 at 18:58, Guido van Rossum wrote: > The naming of the functions feels inconsistent -- maybe pack(directory, > target) -> create_archive(directory, archive), and set_interpreter() -> > copy_archive(archive, new_archive)? One possible source of confusion with copy_archive (and i

Re: [Python-Dev] Request for Pronouncement: PEP 441 - Improving Python ZIP Application Support

2015-02-25 Thread Serhiy Storchaka
On 24.02.15 21:01, Guido van Rossum wrote: On Tue, Feb 24, 2015 at 10:50 AM, Paul Moore mailto:p.f.mo...@gmail.com>> wrote: On 24 February 2015 at 18:24, Guido van Rossum mailto:gu...@python.org>> wrote: > I'd specify that when the output argument is a file open for writing, it is >

Re: [Python-Dev] Request for Pronouncement: PEP 441 - Improving Python ZIP Application Support

2015-02-24 Thread Guido van Rossum
Maybe just fail if the target name already exists? On Tue, Feb 24, 2015 at 12:51 PM, Paul Moore wrote: > On 24 February 2015 at 20:32, Barry Warsaw wrote: > >>To modify an archive could be done using > >> > >>python -m zipapp old.pyz new.pyz [-p interpreter] > >> > >>Default is to strip the

Re: [Python-Dev] Request for Pronouncement: PEP 441 - Improving Python ZIP Application Support

2015-02-24 Thread Nick Coghlan
On 25 Feb 2015 06:52, "Paul Moore" wrote: > > On 24 February 2015 at 20:32, Barry Warsaw wrote: > >>To modify an archive could be done using > >> > >>python -m zipapp old.pyz new.pyz [-p interpreter] > >> > >>Default is to strip the shebang (no -p option). There's no option to > >>omit the ta

Re: [Python-Dev] Request for Pronouncement: PEP 441 - Improving Python ZIP Application Support

2015-02-24 Thread Paul Moore
On 24 February 2015 at 21:09, Ethan Furman wrote: > Another way to support this is with subcommands. Have the default [implicit] > command be to create the zip app, and then > add any subcommands we need: > > python -m zipapp [create] foo #creates a foo.pyz from the foo directory > > pytho

Re: [Python-Dev] Request for Pronouncement: PEP 441 - Improving Python ZIP Application Support

2015-02-24 Thread Ethan Furman
On 02/24/2015 01:00 PM, Ethan Furman wrote: > On 02/24/2015 12:51 PM, Paul Moore wrote: >> $ python -m zipapp foo.pyz --info >> Interpreter: /usr/bin/python >> $ python -m zipapp bar.pyz --info >> Interpreter: Another way to support this is with subcommands. Have the default [implicit] command

Re: [Python-Dev] Request for Pronouncement: PEP 441 - Improving Python ZIP Application Support

2015-02-24 Thread Brett Cannon
On Tue Feb 24 2015 at 3:21:30 PM Paul Moore wrote: > On 24 February 2015 at 18:58, Guido van Rossum wrote: > > Why no command-line equivalent for the other two methods? I propose the > > following interface: if there's only one positional argument, we're > asking > > to print its shebang line;

Re: [Python-Dev] Request for Pronouncement: PEP 441 - Improving Python ZIP Application Support

2015-02-24 Thread Barry Warsaw
On Feb 24, 2015, at 08:20 PM, Paul Moore wrote: >(side note: --python/-p or --interpreter/-i?) and set the entry point, Both virtualenv and (I think) pex use --python/-p so that seems to be the overwhelming trend . >To modify an archive could be done using > >python -m zipapp old.pyz new.pyz

Re: [Python-Dev] Request for Pronouncement: PEP 441 - Improving Python ZIP Application Support

2015-02-24 Thread Guido van Rossum
On Tue, Feb 24, 2015 at 10:50 AM, Paul Moore wrote: > On 24 February 2015 at 18:24, Guido van Rossum wrote: > > Here's my review. I really like where this is going but I have a few > > questions and suggestions (I can't help myself :-). > > Thanks. > > > [I sneaked a peek at the update you sent

Re: [Python-Dev] Request for Pronouncement: PEP 441 - Improving Python ZIP Application Support

2015-02-24 Thread Paul Moore
On 24 February 2015 at 17:46, Guido van Rossum wrote: > I can do it but I don't want to be reviewing and accepting a PEP that's > still under discussion, and I don't have the bandwidth to follow the > discussion here -- I can only read the PEP. I will start that now. I'm just about to push an upd

Re: [Python-Dev] Request for Pronouncement: PEP 441 - Improving Python ZIP Application Support

2015-02-24 Thread Nick Coghlan
On 24 February 2015 at 06:32, Paul Moore wrote: > On 23 February 2015 at 19:47, Guido van Rossum wrote: >> So is the PEP ready for pronouncement or should there be more discussion? > > I think Brett's idea is worth incorporating, so let's thrash that out first. > >> Also, do you have a BDFL-deleg

Re: [Python-Dev] Request for Pronouncement: PEP 441 - Improving Python ZIP Application Support

2015-02-23 Thread Paul Moore
On 23 February 2015 at 21:18, Serhiy Storchaka wrote: > On 23.02.15 22:51, Paul Moore wrote: >> >> BTW, while I was looking at the API, I realised I don't like the order >> of arguments in pack(). I'm tempted to make it pack(directory, >> target=None, interpreter=None, main=None) where a target of

Re: [Python-Dev] Request for Pronouncement: PEP 441 - Improving Python ZIP Application Support

2015-02-23 Thread Paul Moore
On 23 February 2015 at 21:02, Brett Cannon wrote: >> The real problem with overwriting is if there's a failure during the >> overwrite you lose the original file. My original API had overwrite as >> the default, but I think the risk makes that a bad idea. > > > Couldn't you catch the exception, wr

Re: [Python-Dev] Request for Pronouncement: PEP 441 - Improving Python ZIP Application Support

2015-02-23 Thread Paul Moore
On 23 February 2015 at 19:47, Guido van Rossum wrote: > So is the PEP ready for pronouncement or should there be more discussion? I think Brett's idea is worth incorporating, so let's thrash that out first. > Also, do you have a BDFL-delegate or do you want me to review it? No-one has stepped u

Re: [Python-Dev] Request for Pronouncement: PEP 441 - Improving Python ZIP Application Support

2015-02-23 Thread Serhiy Storchaka
On 23.02.15 21:22, Ethan Furman wrote: This could be a completely stupid question, but how does the zip file know where the individual files are? More to the point, does the index work via relative or absolute offset? If absolute, wouldn't the index have to be rewritten if the zip portion of

Re: [Python-Dev] Request for Pronouncement: PEP 441 - Improving Python ZIP Application Support

2015-02-23 Thread Thomas Wouters
On Mon, Feb 23, 2015 at 8:24 PM, Paul Moore wrote: > On 23 February 2015 at 19:01, Daniel Holth wrote: > > Sounds reasonable. It could be done by just reading the entire file > > contents after the shebang and re-writing them with the necessary > > offset all in RAM, truncating the file if neces