Lines Matching refs:ZipFile
48 .. class:: ZipFile
74 methods of :class:`ZipFile` objects. Most users of the :mod:`zipfile` module
137 ZipFile Objects
141 .. class:: ZipFile(file, mode='r', compression=ZIP_STORED, allowZip64=True, \
190 ZipFile is also a context manager and therefore supports the
194 with ZipFile('spam.zip', 'w') as myzip:
198 Added the ability to use :class:`ZipFile` as a context manager.
224 .. method:: ZipFile.close()
230 .. method:: ZipFile.getinfo(name)
237 .. method:: ZipFile.infolist()
244 .. method:: ZipFile.namelist()
249 .. method:: ZipFile.open(name, mode='r', pwd=None, *, force_zip64=False)
256 :meth:`~ZipFile.open` is also a context manager and therefore supports the
259 with ZipFile('spam.zip') as myzip:
268 These objects can operate independently of the ZipFile.
296 Calling :meth:`.open` on a closed ZipFile will raise a :exc:`ValueError`.
300 .. method:: ZipFile.extract(member, path=None, pwd=None)
321 Calling :meth:`extract` on a closed ZipFile will raise a
328 .. method:: ZipFile.extractall(path=None, members=None, pwd=None)
344 Calling :meth:`extractall` on a closed ZipFile will raise a
351 .. method:: ZipFile.printdir()
356 .. method:: ZipFile.setpassword(pwd)
361 .. method:: ZipFile.read(name, pwd=None)
367 :meth:`read` on a ZipFile that uses a compression method other than
373 Calling :meth:`read` on a closed ZipFile will raise a :exc:`ValueError`.
377 .. method:: ZipFile.testzip()
383 Calling :meth:`testzip` on a closed ZipFile will raise a
387 .. method:: ZipFile.write(filename, arcname=None, compress_type=None, \
414 Calling :meth:`write` on a ZipFile created with mode ``'r'`` or
415 a closed ZipFile will raise a :exc:`ValueError`. Previously,
419 .. method:: ZipFile.writestr(zinfo_or_arcname, data, compress_type=None, \
446 Calling :meth:`writestr` on a ZipFile created with mode ``'r'`` or
447 a closed ZipFile will raise a :exc:`ValueError`. Previously,
453 .. attribute:: ZipFile.filename
457 .. attribute:: ZipFile.debug
463 .. attribute:: ZipFile.comment
467 :class:`ZipFile` instance created with mode ``'w'``, ``'x'`` or ``'a'``,
480 :class:`ZipFile` instance or ``file`` suitable for passing to
481 the :class:`ZipFile` constructor).
498 Invoke :meth:`ZipFile.open` on the current path.
505 :meth:`ZipFile.open`.
559 :class:`ZipFile` constructor, and one additional parameter, *optimize*.
570 Instances have one method in addition to those of :class:`ZipFile` objects:
635 :meth:`.infolist` methods of :class:`ZipFile` objects. Each object stores