diff options
author | Raymond Hettinger <python@rcn.com> | 2011-01-27 07:34:45 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2011-01-27 07:34:45 (GMT) |
commit | e6f0abf34ae80a5b25543f18c4a73dfae85f1b4d (patch) | |
tree | e7cabd0a60d41781bc1cbfbad33134c1f1bc57b5 | |
parent | 712d2b4f4be62888b7d724fdb0ea62adbbfb42d5 (diff) | |
download | cpython-e6f0abf34ae80a5b25543f18c4a73dfae85f1b4d.zip cpython-e6f0abf34ae80a5b25543f18c4a73dfae85f1b4d.tar.gz cpython-e6f0abf34ae80a5b25543f18c4a73dfae85f1b4d.tar.bz2 |
More typical sample invocation of tarfile.
-rw-r--r-- | Doc/whatsnew/3.2.rst | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Doc/whatsnew/3.2.rst b/Doc/whatsnew/3.2.rst index 8901b5c..94257ae 100644 --- a/Doc/whatsnew/3.2.rst +++ b/Doc/whatsnew/3.2.rst @@ -1344,7 +1344,7 @@ function can return *None*:: tarinfo.uname = 'monty' # redact the user name return tarinfo - >>> with tarfile.TarFile(name='myarchive.tar', mode='w') as tf: + >>> with tarfile.open(name='myarchive.tar.gz', mode='w:gz') as tf: for filename in glob.glob('*.txt'): tf.add(filename, filter=myfilter) tf.list() |