Serhiy Storchaka added the comment: I think Berker has misunderstood me. Here is a patch based on issue13477_v5.diff with some cherry-picked changes from issue13477_v6.diff and several other changes:
* --create, --extract, --list, and --test options are now mutual exclusive. * --test now test a tarfile for integrity (as in the zipfile module). * File names in output are printed now with repr(). * Now tarfile CLI now is silent by default. Added option -v (--verbose) to print more verbose output as in issue13477_v5.diff. * Added helps for arguments. * Fixed and enhanced tests, I'm going to commit this patch at short time. Known bugs: * Help for --extract shows "--extract <tarfile> [<output_dir> ...]" instead of "--extract <tarfile> [<output_dir>]". --extract accepts only 1 to 2 arguments. * --list fails with a tarfile containing unencodable file names. In particular it fails with test tarfiles in the test suite. * Possible problems with unusual locales and file system encodings. * Corrupted tarfiles produces tracebacks. * Tests for --create should check that created tarfile contains correct files. * Tests for --create should check that correct files are extracted. * Needed tests for non-ASCII file names. Besides all this I think the patch can be committed. ---------- stage: patch review -> commit review Added file: http://bugs.python.org/file32795/tarfile_cli.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue13477> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com