summaryrefslogtreecommitdiffstats
path: root/Modules/zipimport.c
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2008-05-11 15:05:13 (GMT)
committerGeorg Brandl <georg@python.org>2008-05-11 15:05:13 (GMT)
commit6a57c08dc828ff8512c047c97e7c7edfb0abbc74 (patch)
tree74e089debd39df01c79b57352dee0a05b57dae50 /Modules/zipimport.c
parentae98f50eca5c5fbae6ae9ba390c5ed8729489b00 (diff)
downloadcpython-6a57c08dc828ff8512c047c97e7c7edfb0abbc74.zip
cpython-6a57c08dc828ff8512c047c97e7c7edfb0abbc74.tar.gz
cpython-6a57c08dc828ff8512c047c97e7c7edfb0abbc74.tar.bz2
#1326: document and test zipimporter.archive and zipimporter.prefix.
Diffstat (limited to 'Modules/zipimport.c')
-rw-r--r--Modules/zipimport.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/Modules/zipimport.c b/Modules/zipimport.c
index a57812d..d3cd4ad 100644
--- a/Modules/zipimport.c
+++ b/Modules/zipimport.c
@@ -555,8 +555,15 @@ PyDoc_STRVAR(zipimporter_doc,
"zipimporter(archivepath) -> zipimporter object\n\
\n\
Create a new zipimporter instance. 'archivepath' must be a path to\n\
-a zipfile. ZipImportError is raised if 'archivepath' doesn't point to\n\
-a valid Zip archive.");
+a zipfile, or to a specific path inside a zipfile. For example, it can be\n\
+'/tmp/myimport.zip', or '/tmp/myimport.zip/mydirectory', if mydirectory is a\n\
+valid directory inside the archive.\n\
+\n\
+'ZipImportError is raised if 'archivepath' doesn't point to a valid Zip\n\
+archive.\n\
+\n\
+The 'archive' attribute of zipimporter objects contains the name of the\n\
+zipfile targeted.");
#define DEFERRED_ADDRESS(ADDR) 0