]> granicus.if.org Git - python/commitdiff
Improve interlinking of archiving/compression modules docs.
authorÉric Araujo <merwok@netwok.org>
Sun, 26 Feb 2012 00:10:14 +0000 (01:10 +0100)
committerÉric Araujo <merwok@netwok.org>
Sun, 26 Feb 2012 00:10:14 +0000 (01:10 +0100)
- Remove duplicate list of links to the other modules from each
  module’s doc (people can already go up to library/archiving and
  there they can see the list).

- Link to shutil high-level operations.

Reviewed by Nadeem Vawda in #6715.

Doc/library/archiving.rst
Doc/library/bz2.rst
Doc/library/gzip.rst
Doc/library/shutil.rst
Doc/library/tarfile.rst
Doc/library/zipfile.rst
Doc/library/zlib.rst

index 7d0df5f575a99c98aeb4b7dd3ce5b738fe07b74d..472c617182af0c64e7b903b61465a2ddccf35f2e 100644 (file)
@@ -7,6 +7,7 @@ Data Compression and Archiving
 
 The modules described in this chapter support data compression with the zlib,
 gzip, and bzip2 algorithms, and  the creation of ZIP- and tar-format archives.
+See also :ref:`archiving-operations` provided by the :mod:`shutil` module.
 
 
 .. toctree::
index 20dc765774d57846e35977074f9ba576ce5758e7..79058fbd498ec4cbae467894f8a0fef146c31778 100644 (file)
@@ -14,9 +14,6 @@ This module provides a comprehensive interface for the bz2 compression library.
 It implements a complete file interface, one-shot (de)compression functions, and
 types for sequential (de)compression.
 
-For other archive formats, see the :mod:`gzip`, :mod:`zipfile`, and
-:mod:`tarfile` modules.
-
 Here is a summary of the features offered by the bz2 module:
 
 * :class:`BZ2File` class implements a complete file interface, including
index e074bfc7032e58d954d0cfaf2a52ba7c820d0db6..470de08906cce5f34ffbc2526ae8d7743be65aab 100644 (file)
@@ -22,9 +22,6 @@ Note that additional file formats which can be decompressed by the
 :program:`gzip` and :program:`gunzip` programs, such  as those produced by
 :program:`compress` and :program:`pack`, are not supported by this module.
 
-For other archive formats, see the :mod:`bz2`, :mod:`zipfile`, and
-:mod:`tarfile` modules.
-
 The module defines the following items:
 
 
index 78c38e50da76a8942dee326f6df1d8581711d887..a330018a418c72cf2dc529cec25f6b2c724a0004 100644 (file)
@@ -31,6 +31,8 @@ copying and removal. For operations on individual files, see also the
    are not copied.
 
 
+.. _file-operations:
+
 Directory and files operations
 ------------------------------
 
@@ -185,7 +187,7 @@ Directory and files operations
    .. versionadded:: 2.3
 
 
-.. _shutil-example:
+.. _copytree-example:
 
 copytree example
 ::::::::::::::::
@@ -254,8 +256,13 @@ Another example that uses the *ignore* argument to add a logging call::
    copytree(source, destination, ignore=_logpath)
 
 
-Archives operations
--------------------
+.. _archiving-operations:
+
+Archiving operations
+--------------------
+
+High-level utilities to create and read compressed and archived files are also
+provided.  They rely on the :mod:`zipfile` and :mod:`tarfile` modules.
 
 .. function:: make_archive(base_name, format, [root_dir, [base_dir, [verbose, [dry_run, [owner, [group, [logger]]]]]]])
 
@@ -322,6 +329,8 @@ Archives operations
    .. versionadded:: 2.7
 
 
+.. _archiving-example:
+
 Archiving example
 :::::::::::::::::
 
@@ -346,5 +355,3 @@ The resulting archive contains::
     -rw------- tarek/staff    1675 2008-06-09 13:26:54 ./id_rsa
     -rw-r--r-- tarek/staff     397 2008-06-09 13:26:54 ./id_rsa.pub
     -rw-r--r-- tarek/staff   37192 2010-02-06 18:23:10 ./known_hosts
-
-
index 5502adce74fc9d302cdd92e3572479ad2798ec46..b6124e1e40c5a89bd463d179b70452996db73105 100644 (file)
@@ -16,7 +16,8 @@
 
 The :mod:`tarfile` module makes it possible to read and write tar
 archives, including those using gzip or bz2 compression.
-(:file:`.zip` files can be read and written using the :mod:`zipfile` module.)
+Use the :mod:`zipfile` module to read or write :file:`.zip` files, or the
+higher-level functions in :ref:`shutil <archiving-operations>`.
 
 Some facts and figures:
 
index 14e40c8b787480095b34d2f561e1442f4886d1dc..68e8dfac4e1d9714acba03f3da51072a3cf6bec7 100644 (file)
@@ -25,9 +25,6 @@ decryption of encrypted files in ZIP archives, but it currently cannot
 create an encrypted file.  Decryption is extremely slow as it is
 implemented in native Python rather than C.
 
-For other archive formats, see the :mod:`bz2`, :mod:`gzip`, and
-:mod:`tarfile` modules.
-
 The module defines the following items:
 
 .. exception:: BadZipfile
index 92a3197337fe040203017b54f68c44144e03a384..bd08f7f6a09f41c346579da2e28a1cd01183e4fa 100644 (file)
@@ -19,9 +19,7 @@ order.  This documentation doesn't attempt to cover all of the permutations;
 consult the zlib manual at http://www.zlib.net/manual.html for authoritative
 information.
 
-For reading and writing ``.gz`` files see the :mod:`gzip` module. For
-other archive formats, see the :mod:`bz2`, :mod:`zipfile`, and
-:mod:`tarfile` modules.
+For reading and writing ``.gz`` files see the :mod:`gzip` module.
 
 The available exception and functions in this module are: