]> granicus.if.org Git - python/commitdiff
Improve interlinking of archiving/compression modules docs.
authorÉric Araujo <merwok@netwok.org>
Mon, 16 Jan 2012 15:55:55 +0000 (16:55 +0100)
committerÉric Araujo <merwok@netwok.org>
Mon, 16 Jan 2012 15:55:55 +0000 (16:55 +0100)
- Remove duplicated 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 f2d08ada0cb690f86f653f1657decd654f7bd623..75d137c9a8d02601a961e0665decb2029506f0b7 100644 (file)
@@ -6,6 +6,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 d9a2bad7567f857fb3e663d5d8e6a77462bc05e2..445c4de9c91acd6db007c8be2075e3642d63173b 100644 (file)
@@ -12,9 +12,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 48a86942fc737da8548522f4f67663bd76ef369f..8aca2dd95641974afa369a7193ac1a6419a01f06 100644 (file)
@@ -21,9 +21,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 8b4aabbb717d938c0a3015467d7d73ed87bc9a53..3b44774d7e2dea9d148dab8708497f5a130fd07d 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
 ------------------------------
 
@@ -181,7 +183,7 @@ Directory and files operations
    (*srcname*, *dstname*, *exception*).
 
 
-.. _shutil-example:
+.. _shutil-copytree-example:
 
 copytree example
 ::::::::::::::::
@@ -248,6 +250,9 @@ Another example that uses the *ignore* argument to add a logging call::
 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]]]]]]])
 
    Create an archive file (such as zip or tar) and return its name.
@@ -375,6 +380,7 @@ Archiving operations
    .. versionadded:: 3.2
 
 
+.. _shutil-archiving-example:
 
 Archiving example
 :::::::::::::::::
@@ -400,5 +406,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 b56058bfab52817da7bf56ffd3d6efcc9cd86dea..46e4900b40be62e9850f890c3a5804865a033d55 100644 (file)
@@ -14,7 +14,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 6f84bcce5705caa0da2266ba90e919e295ff5cc0..bcec1344a29a492beaea89478a291ee5942f89b1 100644 (file)
@@ -23,9 +23,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 a7b8343c7eb048b00f07531af68c7c288f8ec305..897d919e310810f6ca5829f14668764e37081eea 100644 (file)
@@ -18,9 +18,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: