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

2007-07-23 Thread Daniel Stutzbach
On 7/11/07, Andy C [EMAIL PROTECTED] wrote: The good thing about this is that it's extremely simple -- basically 20 lines of C code to add a -z flag that calls a 3-line Python function in the runpy module. Instead of requiring a -z flag, why not have the interpreter peak at the file to see if

[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=detailaid=1739468group_id=5470atid=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.

[Python-Dev] Planned updates for cjkcodecs before 2.4a1

2007-07-23 Thread Tae-Hee Kim
Hello, I am e-mailing you because I am looking for a way to use the CJK codecs and the CJK module that I found for Python. I wasn't able to find any documentation on how to use it so I would appreciate it if you would let me know where I could find it. Thank you in advance. Taehee Kim

Re: [Python-Dev] Planned updates for cjkcodecs before 2.4a1

2007-07-23 Thread Aahz
On Fri, Jul 13, 2007, Tae-Hee Kim wrote: I am e-mailing you because I am looking for a way to use the CJK codecs and the CJK module that I found for Python. I wasn't able to find any documentation on how to use it so I would appreciate it if you would let me know where I could find it.

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

2007-07-23 Thread Guido van Rossum
On 7/12/07, Daniel Stutzbach [EMAIL PROTECTED] wrote: On 7/11/07, Andy C [EMAIL PROTECTED] wrote: The good thing about this is that it's extremely simple -- basically 20 lines of C code to add a -z flag that calls a 3-line Python function in the runpy module. Instead of requiring a -z

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

2007-07-23 Thread Crutcher Dunnavant
Crutcher Dunnavant On Jul 23, 2007, at 9:55 AM, Guido van Rossum [EMAIL PROTECTED] wrote: On 7/12/07, Daniel Stutzbach [EMAIL PROTECTED] wrote: On 7/11/07, Andy C [EMAIL PROTECTED] wrote: The good thing about this is that it's extremely simple -- basically 20 lines of C code to add a -z

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

2007-07-23 Thread Guido van Rossum
On 7/23/07, Crutcher Dunnavant [EMAIL PROTECTED] wrote: Crutcher Dunnavant On Jul 23, 2007, at 9:55 AM, Guido van Rossum [EMAIL PROTECTED] wrote: On 7/12/07, Daniel Stutzbach [EMAIL PROTECTED] wrote: On 7/11/07, Andy C [EMAIL PROTECTED] wrote: The good thing about this is that it's

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

2007-07-23 Thread Phillip J. Eby
At 09:55 AM 7/23/2007 -0700, Guido van Rossum wrote: On 7/12/07, Daniel Stutzbach [EMAIL PROTECTED] wrote: On 7/11/07, Andy C [EMAIL PROTECTED] wrote: The good thing about this is that it's extremely simple -- basically 20 lines of C code to add a -z flag that calls a 3-line Python

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

2007-07-23 Thread Phillip J. Eby
At 10:34 AM 7/23/2007 -0700, Guido van Rossum wrote: There's an ambiguity -- a Zip file could start with a Python (or shell, or Perl) script that bootstraps execution. This is used regularly. Changing the semantics just because the file *ends* with something funny sounds like asking for trouble.

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

2007-07-23 Thread Paul Moore
On 23/07/07, Phillip J. Eby [EMAIL PROTECTED] wrote: Actually, it isn't, because you can't start a zipfile with a Python script. Lord knows I've *tried*, but the Python interpreter just won't accept arbitrary binary data as part of a script. :) That bit me a while back, hard enough that I

[Python-Dev] -z, -i and -m, maybe bug in runpy?

2007-07-23 Thread Phillip J. Eby
While trying to get my -z replacement patch to work, I stumbled across a bug in the -m implementation (and in runpy). It seems that when you run the code of a -m module, it is *not* run in the __main__ module namespace! So even though __name__=='__main__', globals() is not

[Python-Dev] Two spaces or one?

2007-07-23 Thread Talin
In PEP 9 there's a requirement that PEPs must follow the emacs convention of 2 spaces after a period. (I didn't know this was an emacs convention, I thought it was a convention of people who used typewriters.) I've tried hard to maintain this textual convention in my own PEPs, even though it's

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

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

2007-07-23 Thread Guido van Rossum
New icons get added so rarely that each time it happens, Windows has changed enough to make the instructions invalid... I do remember creating icon associations for .py, .pyc, .pyo and .pyw, and separate open associations for these. IIRC the two associations are quite independent. Probably

Re: [Python-Dev] Two spaces or one?

2007-07-23 Thread Josiah Carlson
Talin [EMAIL PROTECTED] wrote: In PEP 9 there's a requirement that PEPs must follow the emacs convention of 2 spaces after a period. (I didn't know this was an emacs convention, I thought it was a convention of people who used typewriters.) If the PEP is displayed as HTML, then one or two

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

2007-07-23 Thread Martin v. Löwis
Andy C schrieb: 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