Vega strike Python Modules doc
0.5.1
Documentation of the " Modules " folder of Vega strike
|
Public Member Functions | |
def | __init__ |
def | namelist |
def | infolist |
def | printdir |
def | testzip |
def | getinfo |
def | read |
def | write |
def | writestr |
def | __del__ |
def | close |
Data Fields | |
debug | |
NameToInfo | |
filelist | |
compression | |
mode | |
filename | |
start_dir | |
Static Public Attributes | |
fp = None | |
Class with methods to open, read, write, close, list zip files. z = ZipFile(file, mode="r", compression=ZIP_STORED) file: Either the path to the file, or a file-like object. If it is a path, the file will be opened and closed by ZipFile. mode: The mode can be either read "r", write "w" or append "a". compression: ZIP_STORED (no compression) or ZIP_DEFLATED (requires zlib).
Definition at line 147 of file zipfile.py.
def __init__ | ( | self, | |
file, | |||
mode = "r" , |
|||
compression = ZIP_STORED |
|||
) |
Open the ZIP file with mode read "r", write "w" or append "a".
Definition at line 160 of file zipfile.py.
def __del__ | ( | self) |
Call the "close()" method in case the user forgot.
Definition at line 455 of file zipfile.py.
References FileWrapper.close(), StringIO.close(), Shelf.close(), Chunk.close(), _Subfile.close(), SGMLParser.close(), openrsrc.close(), URLopener.close(), _socketobject.close(), SSLFakeSocket.close(), _Hqxcoderengine.close(), SSLFakeFile.close(), FileInput.close(), TemporaryFileWrapper.close(), _fileobject.close(), _Rlecoderengine.close(), Wave_read.close(), HTTPResponse.close(), BinHex.close(), GzipFile.close(), Telnet.close(), Au_read.close(), OpenerDirector.close(), _Hqxdecoderengine.close(), SgmlopParser.close(), Aifc_read.close(), _Rledecoderengine.close(), HTTPConnection.close(), ExpatParser.close(), BaseHandler.close(), Au_write.close(), Wave_write.close(), ZipFile.close(), HexBin.close(), TestSGMLParser.close(), file_wrapper.close(), FTP.close(), Unmarshaller.close(), SMTP.close(), ftpwrapper.close(), HTTP.close(), addbase.close(), and addclosehook.close().
def close | ( | self) |
Close the file, and for mode "w" and "a" write the ending records.
Definition at line 459 of file zipfile.py.
References ZipFile._filePassed, ZipFile.filelist, _Mailbox.fp, _Subfile.fp, MultiFile.fp, Message.fp, HTTPResponse.fp, ZipFile.fp, HTTPError.fp, FieldStorage.fp, addbase.fp, GzipFile.mode, and ZipFile.mode.
def getinfo | ( | self, | |
name | |||
) |
Return the instance of ZipInfo given 'name'.
Definition at line 316 of file zipfile.py.
References ZipFile.NameToInfo.
def infolist | ( | self) |
Return a list of class ZipInfo instances for files in the archive.
Definition at line 296 of file zipfile.py.
References ZipFile.filelist.
def namelist | ( | self) |
Return a list of file names in the archive.
Definition at line 289 of file zipfile.py.
References ZipFile.filelist.
def printdir | ( | self) |
Print a table of contents for the zip file.
Definition at line 301 of file zipfile.py.
References ZipFile.filelist.
def read | ( | self, | |
name | |||
) |
Return file bytes (as a string) for name.
Definition at line 320 of file zipfile.py.
References shlex.debug, FTP.debug, ZipFile.debug, NNTP.debug, dispatcher.debug, _Mailbox.fp, _Subfile.fp, MultiFile.fp, Message.fp, HTTPResponse.fp, ZipFile.fp, HTTPError.fp, FieldStorage.fp, addbase.fp, ZipFile.getinfo(), GzipFile.mode, and ZipFile.mode.
def testzip | ( | self) |
Read all the files and check the CRC.
Definition at line 308 of file zipfile.py.
References ZipFile.filelist, RobotFileParser.read(), _Subfile.read(), StringIO.read(), openrsrc.read(), Chunk.read(), MultiFile.read(), MimeTypes.read(), GzipFile.read(), StreamReader.read(), _fileobject.read(), ConfigParser.read(), HTTPResponse.read(), _Hqxdecoderengine.read(), ZipFile.read(), StreamReaderWriter.read(), _Rledecoderengine.read(), StreamRecoder.read(), HexBin.read(), file_wrapper.read, Unpickler.read, and addbase.read.
def write | ( | self, | |
filename, | |||
arcname = None , |
|||
compress_type = None |
|||
) |
Put the bytes from filename into the archive under the name arcname.
Definition at line 371 of file zipfile.py.
References ZipFile._writecheck(), ZipFile.compression, ZipFile.NameToInfo, and aifc.open().
def writestr | ( | self, | |
zinfo, | |||
bytes | |||
) |
Write a file into the archive. The contents is the string 'bytes'.
Definition at line 431 of file zipfile.py.
References ZipFile._writecheck(), and ZipFile.NameToInfo.
compression |
Definition at line 173 of file zipfile.py.
debug |
Definition at line 170 of file zipfile.py.
filelist |
Definition at line 172 of file zipfile.py.
filename |
Definition at line 179 of file zipfile.py.
|
static |
Definition at line 158 of file zipfile.py.
mode |
Definition at line 174 of file zipfile.py.
NameToInfo |
Definition at line 171 of file zipfile.py.
start_dir |
Definition at line 238 of file zipfile.py.