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.

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.  :)

Second, unless you somehow managed to overcome that little obstacle, 
you're not going to be trying to run the zipfile with the Python 
interpreter, anyway.  Instead, the #! line (or .exe header on 
Windows) will be invoking whatever interpreter or program actually 
works for that file.

Third, if you mistakenly pass an existing such zipfile to a new 
Python interpreter that supports zipfiles, and there's no 
__main__.py* file in it, you're just going to get a different error 
message than the syntax error you'd have received from an older 
Python.interpreter to run it with -- but otherwise no difference.

In other words, AFAICT there's really no ambiguity here.

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to