diff options
author | R David Murray <rdmurray@bitdance.com> | 2014-10-04 00:30:42 (GMT) |
---|---|---|
committer | R David Murray <rdmurray@bitdance.com> | 2014-10-04 00:30:42 (GMT) |
commit | c6cf35d36d8b1a9d741f86ce8d80a005ff23ba8e (patch) | |
tree | 37b75ecd5fb385a45a1768ae60aa53760608d541 | |
parent | a02ae2500a7f7adcccd55b7de206908ec109640f (diff) | |
download | cpython-c6cf35d36d8b1a9d741f86ce8d80a005ff23ba8e.zip cpython-c6cf35d36d8b1a9d741f86ce8d80a005ff23ba8e.tar.gz cpython-c6cf35d36d8b1a9d741f86ce8d80a005ff23ba8e.tar.bz2 |
#14056: Small improvements to the tarfile documentation.
Patch by Éric Araujo with help from Lars Gustäbel.
-rw-r--r-- | Doc/library/tarfile.rst | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/Doc/library/tarfile.rst b/Doc/library/tarfile.rst index 32ec230..75bde66 100644 --- a/Doc/library/tarfile.rst +++ b/Doc/library/tarfile.rst @@ -21,7 +21,8 @@ higher-level functions in :ref:`shutil <archiving-operations>`. Some facts and figures: -* reads and writes :mod:`gzip` and :mod:`bz2` compressed archives. +* reads and writes :mod:`gzip` and :mod:`bz2` compressed archives + if the respective modules are available. * read/write support for the POSIX.1-1988 (ustar) format. @@ -179,6 +180,14 @@ Some facts and figures: :attr:`TarFile.errorlevel`\ ``== 2``. +The following constants are available at the module level: + +.. data:: ENCODING + + The default character encoding: ``'utf-8'`` on Windows, the value returned by + :func:`sys.getfilesystemencoding` otherwise. + + .. exception:: HeaderError Is raised by :meth:`TarInfo.frombuf` if the buffer it gets is invalid. @@ -211,20 +220,15 @@ details. The default format for creating archives. This is currently :const:`GNU_FORMAT`. -The following variables are available on module level: - - -.. data:: ENCODING - - The default character encoding i.e. the value from either - :func:`sys.getfilesystemencoding` or :func:`sys.getdefaultencoding`. - - .. seealso:: Module :mod:`zipfile` Documentation of the :mod:`zipfile` standard module. + :ref:`archiving-operations` + Documentation of the higher-level archiving facilities provided by the + standard :mod:`shutil` module. + `GNU tar manual, Basic Tar Format <http://www.gnu.org/software/tar/manual/html_node/Standard.html>`_ Documentation for tar archive files, including GNU tar extensions. |