diff --git a/Doc/library/tarfile.rst b/Doc/library/tarfile.rst --- a/Doc/library/tarfile.rst +++ b/Doc/library/tarfile.rst @@ -19,7 +19,8 @@ higher-level functions in :ref:`shutil < Some facts and figures: -* reads and writes :mod:`gzip` and :mod:`bz2` compressed archives. +* reads and writes gzip'ed (if the :mod:`gzip` module is available) and bzip2'ed + (using the :mod:`bz2` module) compressed archives. * read/write support for the POSIX.1-1988 (ustar) format. @@ -159,34 +160,7 @@ The :mod:`tarfile` module defines the fo Is raised by :meth:`TarInfo.frombuf` if the buffer it gets is invalid. - -Each of the following constants defines a tar archive format that the -:mod:`tarfile` module is able to create. See section :ref:`tar-formats` for -details. - - -.. data:: USTAR_FORMAT - - POSIX.1-1988 (ustar) format. - - -.. data:: GNU_FORMAT - - GNU tar format. - - -.. data:: PAX_FORMAT - - POSIX.1-2001 (pax) format. - - -.. data:: DEFAULT_FORMAT - - The default format for creating archives. This is currently :const:`GNU_FORMAT`. - - -The following variables are available on module level: - +The following constants are available at the module level: .. data:: ENCODING @@ -194,11 +168,40 @@ The following variables are available on :func:`sys.getfilesystemencoding` otherwise. +Each of the following constants defines a tar archive format that the +:mod:`tarfile` module is able to create. See section :ref:`tar-formats` for +details. + + +.. data:: USTAR_FORMAT + + POSIX.1-1988 (ustar) format. + + +.. data:: GNU_FORMAT + + GNU tar format. + + +.. data:: PAX_FORMAT + + POSIX.1-2001 (pax) format. + + +.. data:: DEFAULT_FORMAT + + The default format for creating archives. This is currently :const:`GNU_FORMAT`. + + .. seealso:: Module :mod:`zipfile` Documentation of the :mod:`zipfile` standard module. + :ref:`archiving-operations` + Documentation of the higer-level archiving facilities provided by the + standard :mod:`shutil` module. + `GNU tar manual, Basic Tar Format `_ Documentation for tar archive files, including GNU tar extensions.