A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2007-July/073913.html below:

[Python-Dev] Alternative to -z option

[Python-Dev] Alternative to -z option [Python-Dev] Alternative to -z optionPhillip J. Eby pje at telecommunity.com
Fri Jul 13 20:10:25 CEST 2007
After thinking about it some more, I suggest that instead of using a 
special option to execute a zipfile, we simply always get an importer 
for the script filename.  If the importer is imp.NullImporter, then 
we do normal script processing.  Otherwise, we set set sys.path[0] = 
sys.argv[0] = script, and import __main__.

This will support zipfiles and directories, Windows and Unix, even 
using "env" (since no option to the interpreter is required).

Thoughts?

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4