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

Nick Coghlan ncoghlan at gmail.com
Sat Jul 14 19:28:21 CEST 2007

Jim Jewett wrote:
> If anything, I would like to see the -m option enhanced so that if it
> gets a recognized "collection" file type (including a directory or
> zip), it does the right thing.  Whether that actually makes sense, or
> defeats the purpose of the -m shortcut, I'm not sure.

-m deals with the package namespace as it already stands - it knows 
nothing whatsoever about the underlying filesystem (and that's 
deliberate - the runpy module relies on PEP 302 to abstract away all 
those details).

On Phillip's idea regarding being able to execute directories and zip 
files, I think the semantics would actually be manageable (as 
directories and zip files can be definitely identified), but I'd be 
concerned as to the startup cost for checking what is being executed.


Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia

More information about the Python-Dev mailing list