Lines Matching refs:ZipFile

40 .. class:: ZipFile
56 methods of :class:`ZipFile` objects. Most users of the :mod:`zipfile` module
96 ZipFile Objects
100 .. class:: ZipFile(file[, mode[, compression[, allowZip64]]])
130 ZipFile is also a context manager and therefore supports the
134 with ZipFile('spam.zip', 'w') as myzip:
138 Added the ability to use :class:`ZipFile` as a context manager.
141 .. method:: ZipFile.close()
147 .. method:: ZipFile.getinfo(name)
154 .. method:: ZipFile.infolist()
161 .. method:: ZipFile.namelist()
166 single: universal newlines; zipfile.ZipFile.open method
169 .. method:: ZipFile.open(name[, mode[, pwd]])
177 Calling :meth:`.open` on a closed ZipFile will raise a :exc:`RuntimeError`.
188 If the ZipFile was created by passing in a file-like object as the first
190 ZipFile's file pointer. Under these circumstances, the object returned by
192 on the ZipFile object. If the ZipFile was created by passing in a string (the
195 operate independently of the ZipFile.
206 .. method:: ZipFile.extract(member[, path[, pwd]])
229 .. method:: ZipFile.extractall([path[, members[, pwd]]])
249 .. method:: ZipFile.printdir()
254 .. method:: ZipFile.setpassword(pwd)
261 .. method:: ZipFile.read(name[, pwd])
267 :meth:`read` on a closed ZipFile will raise a :exc:`RuntimeError`.
273 .. method:: ZipFile.testzip()
277 :meth:`testzip` on a closed ZipFile will raise a :exc:`RuntimeError`.
280 .. method:: ZipFile.write(filename[, arcname[, compress_type]])
287 :meth:`write` on a ZipFile created with mode ``'r'`` will raise a
288 :exc:`RuntimeError`. Calling :meth:`write` on a closed ZipFile will raise a
309 .. method:: ZipFile.writestr(zinfo_or_arcname, bytes[, compress_type])
315 opened with mode ``'w'`` or ``'a'`` -- calling :meth:`writestr` on a ZipFile
317 :meth:`writestr` on a closed ZipFile will raise a :exc:`RuntimeError`.
336 .. attribute:: ZipFile.debug
342 .. attribute:: ZipFile.comment
345 :class:`ZipFile` instance created with mode 'a' or 'w', this should be a
355 :class:`ZipFile` constructor. Instances have one method in addition to those of
356 :class:`ZipFile` objects.
388 :meth:`.infolist` methods of :class:`ZipFile` objects. Each object stores