|
__init__(self,
file,
mode=' r ' ,
compression=0,
allowZip64=False)
Open the ZIP file with mode read "r", write "w"
or append "a". |
|
|
|
_GetContents(self)
Read the directory, making sure we close the file if the format is
bad. |
|
|
|
_RealGetContents(self)
Read in the table of contents for the ZIP file. |
|
|
|
namelist(self)
Return a list of file names in the archive. |
|
|
|
infolist(self)
Return a list of class ZipInfo instances for files in the archive. |
|
|
|
printdir(self)
Print a table of contents for the zip file. |
|
|
|
testzip(self)
Read all the files and check the CRC. |
|
|
|
getinfo(self,
name)
Return the instance of ZipInfo given 'name'. |
|
|
|
read(self,
name)
Return file bytes (as a string) for name. |
|
|
|
_writecheck(self,
zinfo)
Check for errors before writing a file to the archive. |
|
|
|
write(self,
filename,
arcname=None,
compress_type=None)
Put the bytes from filename into the archive under the name arcname. |
|
|
|
writestr(self,
zinfo_or_arcname,
bytes)
Write a file into the archive. |
|
|
|
__del__(self)
Call the "close()" method in case the user forgot. |
|
|
|
close(self)
Close the file, and for mode "w" and "a" write
the ending records. |
|
|