Re: [Python-Dev] Add a -z interpreter flag to execute a zip file

2007-07-23 Thread Andy C
Just to update everyone on the status of this, the next thing on my list is to figure out the Windows build and set up the the file association in the installer. Actually, I should ask if there's anything else that I should pay attention to here, e.g. do I have to add an icon association for Windo

[Python-Dev] Add a -z interpreter flag to execute a zip file

2007-07-23 Thread Andy C
I'd like to request comments on this patch I submitted: https://sourceforge.net/tracker/index.php?func=detail&aid=1739468&group_id=5470&atid=305470 There are many details given in the comments on that page. This can be used to deploy Python programs in a very lightweight and cross-platform way.

Re: [Python-Dev] Add a -z interpreter flag to execute a zip file

2007-07-14 Thread Andy C
On 7/13/07, Jim Jewett <[EMAIL PROTECTED]> wrote: > Andy C wrote: > >... a .zip file with a __zipmain__.py module at its root? > > Why not just an __init__.py, which you would normally execute if you > tried to import/run a directory? > > > * Magically looking at

Re: [Python-Dev] Add a -z interpreter flag to execute a zip file

2007-07-13 Thread Andy C
On 7/13/07, Greg Ewing <[EMAIL PROTECTED]> wrote: > Andy C wrote: > > What does "if __name__ == '__main__" mean in > > __main__.py? : ) If someone tries does import __main__ from another > > module in the program, won't that result in an infinite

Re: [Python-Dev] Add a -z interpreter flag to execute a zip file

2007-07-12 Thread Andy C
Another issue I see is that -m and -c have command line parsing semantics, and -z follows those now. python -z foo.zip -z bar As implemented, this would pass sys.argv[0:3] == ['foo.zip', '-z', 'bar'] If you allow multiple -z flags to be meaningful, this gets confusing. The foo.zip program could

Re: [Python-Dev] Add a -z interpreter flag to execute a zip file

2007-07-12 Thread Andy C
On 7/12/07, Phillip J. Eby <[EMAIL PROTECTED]> wrote: > At 03:52 PM 7/12/2007 -0700, Andy C wrote: > >On 7/12/07, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > > > > The patch suggests using .pyz and adding a default association to the >

Re: [Python-Dev] Add a -z interpreter flag to execute a zip file

2007-07-12 Thread Andy C
On 7/12/07, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > > The patch suggests using .pyz and adding a default association to the > > installer (much like .py and .pyw have). > > Ok. It would be good if the patch actually added that extension, rather > than merely suggesting that it should be adde

Re: [Python-Dev] Add a -z interpreter flag to execute a zip file

2007-07-12 Thread Andy C
On 7/12/07, Phillip J. Eby <[EMAIL PROTECTED]> wrote: > At 10:09 AM 7/12/2007 +0200, Martin v. Löwis wrote: > >"" should not be removed from sys.path. It is *not* meant to be > >the current directory, but the directory where the main script > >lives. > > Right; it should be replaced with the zipfil

Re: [Python-Dev] Add a -z interpreter flag to execute a zip file

2007-07-12 Thread Andy C
On 7/12/07, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > But in the description, you said that you do the same on Windows > by making a file that is both a zip file and a batch file. So my > approach is also cross-platform, no? > > How do you get the -z option to work on Windows? What extension >

Re: [Python-Dev] Add a -z interpreter flag to execute a zip file

2007-07-11 Thread Andy C
On 7/11/07, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > > Nick Coghlan has reviewed the patch and seems to think it's a good > > idea. Thomas Wouters also said he likes it, and I ran it by Guido > > earlier and he seemed to think the idea is good, although I don't > > think he has seen the impl

[Python-Dev] Add a -z interpreter flag to execute a zip file

2007-07-11 Thread Andy C
(resending this now that I'm subscribed, not sure it made it through the moderation the first time) I'd like to request comments on this patch I submitted: https://sourceforge.net/tracker/index.php?func=detail&aid=1739468&group_id=5470&atid=305470 There are many details given in the comments on