zip files as nested modules?

Luciano Ramalho ramalho at gmail.com
Fri Apr 6 20:45:26 CEST 2007


Importing modules from zip files was proposed in PEP-273 [1]

Here is how the spec of PEP-273 begins:

'''
Currently, sys.path is a list of directory names as strings.  If this
PEP is implemented, an item of sys.path can be a string naming a zip
file archive.
'''

My interpretation of the above is that, to be importable, a zip file
must be explicitly named in sys.path.

So the mere fact that a zip file lies somewhere in a directory which
is part of the sys.path does not make it importable.

Cheers,

Luciano


[1] http://www.python.org/dev/peps/pep-0273/




More information about the Python-list mailing list