diff options
author | Benjamin Peterson <benjamin@python.org> | 2014-06-07 19:45:37 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2014-06-07 19:45:37 (GMT) |
commit | 9b2731bfdd9756592ae86b2b053969d40c9fa151 (patch) | |
tree | 98e61de825f8532e405d663383b9545e408491c5 /Doc/library | |
parent | c41616230211822e838634b84b445f8a124add08 (diff) | |
download | cpython-9b2731bfdd9756592ae86b2b053969d40c9fa151.zip cpython-9b2731bfdd9756592ae86b2b053969d40c9fa151.tar.gz cpython-9b2731bfdd9756592ae86b2b053969d40c9fa151.tar.bz2 |
document the compress_level argument to tarfile.open (closes #21404)
Patch by Katherine Busch.
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/tarfile.rst | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Doc/library/tarfile.rst b/Doc/library/tarfile.rst index 1ef2703..15b88f8 100644 --- a/Doc/library/tarfile.rst +++ b/Doc/library/tarfile.rst @@ -81,6 +81,10 @@ Some facts and figures: If *fileobj* is specified, it is used as an alternative to a :term:`file object` opened in binary mode for *name*. It is supposed to be at position 0. + For modes ``'w:gz'``, ``'r:gz'``, ``'w:bz2'``, ``'r:bz2'``, :func:`tarfile.open` + accepts the keyword argument *compresslevel* to specify the compression level of + the file. + For special purposes, there is a second format for *mode*: ``'filemode|[compression]'``. :func:`tarfile.open` will return a :class:`TarFile` object that processes its data as a stream of blocks. No random seeking will |