'r'
to read an existing file, 'w'
to
truncate and write a new file, or 'a'
to append to an
existing file. For mode is 'a'
and file
refers to an existing ZIP file, then additional files are added to
it. If file does not refer to a ZIP file, then a new ZIP
archive is appended to the file. This is meant for adding a ZIP
archive to another file, such as python.exe. Using
cat myzip.zip >> python.exe
also works, and at least WinZip can read such files. compression is the ZIP compression method to use when writing the archive, and should be ZIP_STORED or ZIP_DEFLATED; unrecognized values will cause RuntimeError to be raised. If ZIP_DEFLATED is specified but the zlib module is not avaialble, RuntimeError is also raised. The default is ZIP_STORED.
sys.stdout
.
None
.
'w'
or
'a'
.
'w'
or 'a'
.
The following data attribute is also available:
0
(the default, no output) to 3
(the most output). Debugging
information is written to sys.stdout
.
See About this document... for information on suggesting changes.