documentation of import from zip files?

B

Bill Janssen

Is the ability to import Python modules from zip files in 2.3
documented anywhere? I looked in the Language ref at the "import"
statement and in the Library Ref under "ZipFile" module.

I'd like to know the specifics of arcnames in the Python zipfiles,
such as which character is used to separate path parts.

Bill
 
J

John Roth

Bill Janssen said:
Is the ability to import Python modules from zip files in 2.3
documented anywhere? I looked in the Language ref at the "import"
statement and in the Library Ref under "ZipFile" module.

I'd like to know the specifics of arcnames in the Python zipfiles,
such as which character is used to separate path parts.

Look in the "What's New in Python 2.3" document. As far
as directory structure, if the zip module can figure out the directory
structure, so can import. There's no special requirements for
separating directories, or for separating pathnames in the Pythonpath
statement.

The 'zipimport' module doesn't seem to be separately
documented, probably because it's automatically
loaded if a .zip file is detected in the Pythonpath.

John Roth
 
J

Just

It's a standard zip file, so the path separator is '/'.
Look in the "What's New in Python 2.3" document. As far
as directory structure, if the zip module can figure out the directory
structure, so can import. There's no special requirements for
separating directories, or for separating pathnames in the Pythonpath
statement.

The 'zipimport' module doesn't seem to be separately
documented, probably because it's automatically
loaded if a .zip file is detected in the Pythonpath.

See also PEP 302.

Just
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,227
Latest member
Daniella65

Latest Threads

Top