the following functions and classes are defined by the zipfile moduleis_zipfile(filenametests filename to see if it' valid zip file returns true if filename is zip filereturns false otherwise zipfile(filename [mode [compression [,allowzip ]]]opens zip filefilenameand returns zipfile instance mode is 'rto read from an existing file'wto truncate the file and write new fileor 'ato append to an existing file for 'amodeif filename is an existing zip filenew files are added to it if filename is not zip filethe archive is simply appended to the end of the file compression is the zip compression method used when writing to the archive and is either zip_stored or zip_deflated the default is zip_stored the allowzip argument enables the use of zip extensionswhich can be used to create zip files that exceed gb in size by defaultthis is set to false pyzipfile(filename [mode[compression [,allowzip ]]]opens zip file like zipfile(but returns special pyzipfile instance with one extra methodwritepy()used to add python source files to the archive zipinfo([filename [date_time]]manually creates new zipinfo instanceused to contain information about an archive member normallyit' not necessary to call this function except when using the writestr(method of zipfile instance (described laterthe filename and date_time arguments supply values for the filename and date_time attributes described below an instancezof zipfile or pyzipfile supports the following methods and attributesz close(closes the archive file this must be called in order to flush records to the zip file before program termination debug debugging level in the range of (no outputto (most outputz extract(name [path [pwd ]]extracts file from the archive and places it in the current working directory name is either string that fully specifies the archive member or zipinfo instance path specifies different directory in which the file will extractedand pwd is the password to use for encrypted archives extractall([path [members [pwd]]]extracts all members of an archive into the current working directory path specifies different directoryand pwd is password for encrypted archives members is list of members to extractwhich must be proper subset of the list returned by the namelist(method (described nextf lib fl ff