Lines Matching refs:ZipFile

48 .. class:: ZipFile
65 methods of :class:`ZipFile` objects. Most users of the :mod:`zipfile` module
129 ZipFile Objects
133 .. class:: ZipFile(file, mode='r', compression=ZIP_STORED, allowZip64=True, \
176 ZipFile is also a context manager and therefore supports the
180 with ZipFile('spam.zip', 'w') as myzip:
184 Added the ability to use :class:`ZipFile` as a context manager.
207 .. method:: ZipFile.close()
213 .. method:: ZipFile.getinfo(name)
220 .. method:: ZipFile.infolist()
227 .. method:: ZipFile.namelist()
232 .. method:: ZipFile.open(name, mode='r', pwd=None, *, force_zip64=False)
239 :meth:`~ZipFile.open` is also a context manager and therefore supports the
242 with ZipFile('spam.zip') as myzip:
251 These objects can operate independently of the ZipFile.
279 Calling :meth:`.open` on a closed ZipFile will raise a :exc:`ValueError`.
283 .. method:: ZipFile.extract(member, path=None, pwd=None)
304 Calling :meth:`extract` on a closed ZipFile will raise a
311 .. method:: ZipFile.extractall(path=None, members=None, pwd=None)
327 Calling :meth:`extractall` on a closed ZipFile will raise a
334 .. method:: ZipFile.printdir()
339 .. method:: ZipFile.setpassword(pwd)
344 .. method:: ZipFile.read(name, pwd=None)
350 :meth:`read` on a ZipFile that uses a compression method other than
356 Calling :meth:`read` on a closed ZipFile will raise a :exc:`ValueError`.
360 .. method:: ZipFile.testzip()
366 Calling :meth:`testzip` on a closed ZipFile will raise a
370 .. method:: ZipFile.write(filename, arcname=None, compress_type=None, \
392 Calling :meth:`write` on a ZipFile created with mode ``'r'`` or
393 a closed ZipFile will raise a :exc:`ValueError`. Previously,
397 .. method:: ZipFile.writestr(zinfo_or_arcname, data, compress_type=None, \
424 Calling :meth:`writestr` on a ZipFile created with mode ``'r'`` or
425 a closed ZipFile will raise a :exc:`ValueError`. Previously,
431 .. attribute:: ZipFile.filename
435 .. attribute:: ZipFile.debug
441 .. attribute:: ZipFile.comment
445 :class:`ZipFile` instance created with mode ``'w'``, ``'x'`` or ``'a'``,
456 :class:`ZipFile` constructor, and one additional parameter, *optimize*.
467 Instances have one method in addition to those of :class:`ZipFile` objects:
532 :meth:`.infolist` methods of :class:`ZipFile` objects. Each object stores