summaryrefslogtreecommitdiffstats
path: root/Doc/library/tarfile.rst
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2014-06-07 19:45:37 (GMT)
committerBenjamin Peterson <benjamin@python.org>2014-06-07 19:45:37 (GMT)
commit3afd956e09b22558543994b80082e8f51151de5d (patch)
tree5f3198dd9f71f389bec4fd9ca40adb8475645e39 /Doc/library/tarfile.rst
parent93e51aac540f0dbd795e709a6fad0b9a62a5ae73 (diff)
downloadcpython-3afd956e09b22558543994b80082e8f51151de5d.zip
cpython-3afd956e09b22558543994b80082e8f51151de5d.tar.gz
cpython-3afd956e09b22558543994b80082e8f51151de5d.tar.bz2
document the compress_level argument to tarfile.open (closes #21404)
Patch by Katherine Busch.
Diffstat (limited to 'Doc/library/tarfile.rst')
-rw-r--r--Doc/library/tarfile.rst4
1 files changed, 4 insertions, 0 deletions
diff --git a/Doc/library/tarfile.rst b/Doc/library/tarfile.rst
index 1c6b67c..bd218e1 100644
--- a/Doc/library/tarfile.rst
+++ b/Doc/library/tarfile.rst
@@ -77,6 +77,10 @@ Some facts and figures:
If *fileobj* is specified, it is used as an alternative to a file object opened
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