Name
write
Synopsis
z
.write(filename
,arcname
=None,compress_type
=None)
Writes the file named by string filename
to archive z
, with archive member name
arcname
. When
arcname
is None
,
write
uses filename
as
the archive member name. When
compress_type
is None
,
write
uses
z
’s compression type;
otherwise, compress_type
is
zipfile.ZIP_STORED
or
zipfile.ZIP_DEFLATED
, and specifies how to
compress the file. z
must be opened for
'w
' or 'a
‘.
Get Python in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.