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 <wink>.

>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 target and do an inplace update because I feel the default
>action (strip the shebang from the existing file with no backup) is
>too dangerous.

You have to be careful about the case where old.pyz == new.pyz (e.g. either
handling this case safely or complaining loudly) , but also you could handle
it by using a .tmp file and renaming.  E.g. old.pyz -> old.pyz.bak and
old.pyz.tmp -> old.pyz.

>3. What to call the "show the shebang line" option

I don't know how useful this is, given that (on *nix at least) you can
effectively do the same with head(1).

Cheers,
-Barry
_______________________________________________
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/archive%40mail-archive.com

Reply via email to