summaryrefslogtreecommitdiffstats
path: root/Doc/library/zipfile.rst
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2008-07-03 12:51:14 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2008-07-03 12:51:14 (GMT)
commit8c4364127193100d0c3e267f5a49aadd096732a6 (patch)
treef7e0f461e58fa5cd6d923b9d09e4010aa767bc8b /Doc/library/zipfile.rst
parentf5d2b4ce930666c9f58c9c7da1744388143860df (diff)
downloadcpython-8c4364127193100d0c3e267f5a49aadd096732a6.zip
cpython-8c4364127193100d0c3e267f5a49aadd096732a6.tar.gz
cpython-8c4364127193100d0c3e267f5a49aadd096732a6.tar.bz2
Patch #1622: Correct interpretation of various ZIP header fields.
Also fixes - Issue #1526: Allow more than 64k files to be added to Zip64 file. - Issue #1746: Correct handling of zipfile archive comments (previously archives with comments over 4k were flagged as invalid). Allow writing Zip files with archives by setting the 'comment' attribute of a ZipFile.
Diffstat (limited to 'Doc/library/zipfile.rst')
-rw-r--r--Doc/library/zipfile.rst8
1 files changed, 7 insertions, 1 deletions
diff --git a/Doc/library/zipfile.rst b/Doc/library/zipfile.rst
index f87b856..7ba5ffe 100644
--- a/Doc/library/zipfile.rst
+++ b/Doc/library/zipfile.rst
@@ -285,7 +285,7 @@ ZipFile Objects
member of the given :class:`ZipInfo` instance. By default, the
:class:`ZipInfo` constructor sets this member to :const:`ZIP_STORED`.
-The following data attribute is also available:
+The following data attributes are also available:
.. attribute:: ZipFile.debug
@@ -294,6 +294,12 @@ The following data attribute is also available:
output) to ``3`` (the most output). Debugging information is written to
``sys.stdout``.
+.. attribute:: ZipFile.comment
+
+ The comment text associated with the ZIP file. If assigning a comment to a
+ :class:`ZipFile` instance created with mode 'a' or 'w', this should be a
+ string no longer than 65535 bytes. Comments longer than this will be
+ truncated in the written archive when :meth:`ZipFile.close` is called.
.. _pyzipfile-objects: