[Python-checkins] cpython (2.7): document the compress_level argument to tarfile.open (closes #21404)
benjamin.peterson
python-checkins at python.org
Sat Jun 7 21:48:18 CEST 2014
http://hg.python.org/cpython/rev/390b7fd617a9
changeset: 91064:390b7fd617a9
branch: 2.7
parent: 91062:29d34f4f8900
user: Benjamin Peterson <benjamin at python.org>
date: Sat Jun 07 12:45:37 2014 -0700
summary:
document the compress_level argument to tarfile.open (closes #21404)
Patch by Katherine Busch.
files:
Doc/library/tarfile.rst | 4 ++++
Misc/ACKS | 1 +
2 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/Doc/library/tarfile.rst b/Doc/library/tarfile.rst
--- a/Doc/library/tarfile.rst
+++ b/Doc/library/tarfile.rst
@@ -77,6 +77,10 @@
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
diff --git a/Misc/ACKS b/Misc/ACKS
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -194,6 +194,7 @@
Alastair Burt
Tarn Weisner Burton
Lee Busby
+Katherine Busch
Ralph Butler
Nicolas Cadou
Jp Calderone
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list