Yurttas/PL/SL/python/docs/core-python-programming/doc/16/lib/node160.html

From ZCubes Wiki
Revision as of 19:16, 7 November 2013 by MassBot1 (talk | contribs) (Created page with "<div class="navigation"> {| width="100%" cellspacing="2" align="center" | yurttas/PL/SL/python/docs/core-python-programming/doc/16/lib/zipfile-objects.html|[[Image:yurt...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

7.14 zipfile -- Work with ZIP archives

The ZIP file format is a common archive and compression standard. This module provides tools to create, read, write, append, and list a ZIP file.

The available attributes of this module are:

error
The error raised for bad ZIP files.
_debug
Level of printing, defaults to 1.
ZipFile (...)
The class for reading and writing ZIP files. See ``ZipFile Objects'' (section 7.14.1) for constructor details.
is_zipfile (path)
Returns true if path is a valid ZIP file based on its magic number, otherwise returns false. This module does not currently handle ZIP files which have appended comments.
zip2date (zdate)
Return (year, month, day) for a ZIP date code.
zip2time (ztime)
Return (hour, minute, second) for a ZIP time code.
date2zip (year, month, day)
Return a ZIP date code.
time2zip (hour, minute, second)
Return a ZIP time code.
ZIP_STORED
The numeric constant (0) for an uncompressed archive member.
ZIP_DEFLATED
The numeric constant for the usual ZIP compression method. This requires the zlib module. No other compression methods are currently supported.

See Also:

XXX point to ZIP format definition

XXX point to Info-ZIP home page; mention WiZ


Subsections