[Python-Dev] Request for Pronouncement: PEP 441 (original) (raw)

[Python-Dev] Request for Pronouncement: PEP 441 - Improving Python ZIP Application Support

Paul Moore p.f.moore at gmail.com
Tue Feb 24 22:43:07 CET 2015


On 24 February 2015 at 21:09, Ethan Furman <ethan at stoneleaf.us> wrote:

Another way to support this is with subcommands. Have the default [implicit] command be to create the zip app, and then add any subcommands we need:

python -m zipapp [create] foo #creates a foo.pyz from the foo directory python -m zipapp info foo.pyz # prints out shebang for foo.pyz python -m zipapp info --all foo.pyz # prints out shebang and directory structure and files and .... This easily leaves the door open to add new commands in the future if any are still needed, and makes the current commands easy and simple to use.

I didn't know an implicit subcommand was allowed. That would work, although it does mean that you can't build a pyz from a directory "info" without explicitly using the create subcommand.

I think I'm going to go with "python -m zipapp foo.pyz --info" (And an -o option for the target, mandatory when the source is a pyz file, and --python for the interpreter). It's not set in stone yet, so if anyone objects, there's still time to change my mind.

Paul



More information about the Python-Dev mailing list