[Python-Dev] PEP 273: Import Modules from Zip Archives

James C. Ahlstrom jim@interet.com
Mon, 29 Oct 2001 12:28:44 -0500


Guido van Rossum wrote:
[Me]
> > I would like discussion on what the additional sys.path names are.
> 
> Well, propose some.

OK.  I propose that there is one name added to sys.path, and the
file name is "python%s%s.zip" % (sys.version[0], sys.version[2]).
For example, python22.zip.  This is the same on all platforms.

On Unix, the directory is sys.prefix + "/lib".  So for prefix
/usr/local, the path /usr/local/lib/python2.2/ is already on
sys.path, and /usr/local/lib/python22.zip would be added.

On Windows, the directory is the directory of sys.executable.

The zip archive name is always inserted as the second item
in sys.path.  The first always seems to be ''.

JimA