[Python-Dev] PEP 4XX: pyzaa "Improving Python ZIP Application Support"

Stefan Behnel stefan_ml at behnel.de
Wed Apr 3 07:26:22 CEST 2013


Brett Cannon, 02.04.2013 19:28:
> On Tue, Apr 2, 2013 at 1:20 PM, Steve Dower <Steve.Dower at microsoft.com>wrote:
> 
>>> python -m pyzaa pack [-o path/name] [-m module.submodule:callable] [-c]
>> [-w] [-p interpreter] directory:
>>>
>>>    ZIP the contents of directory as directory.pyz or [-w]
>> directory.pyzw. Adds the executable flag to the archive.
>>>
>>> ...
>>>
>>>    -p interpreter include #!interpreter as the first line of the archive
>>
>> What happens when -p is omitted? I'd hope it would add the interpreter
>> used to create the zip (or at least the major version), but that may not be
>> ideal for some reason that I haven't thought of yet.
> 
> Question is whether ``/usr/bin/python3.3`` is better or ``/usr/bin/env
> python3.3``. I vote for the latter since it gets you the right thing
> without having to care about whether the interpreter moved or is being
> hidden by a user-installed interpreter.

It can't work properly from within a virtualenv when you write
"/usr/bin/python", so using "/usr/bin/env" instead is actually required.

Stefan




More information about the Python-Dev mailing list