From e6f0abf34ae80a5b25543f18c4a73dfae85f1b4d Mon Sep 17 00:00:00 2001 From: Raymond Hettinger Date: Thu, 27 Jan 2011 07:34:45 +0000 Subject: More typical sample invocation of tarfile. --- Doc/whatsnew/3.2.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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() -- cgit v0.12