diff --git a/Doc/library/__future__.rst b/Doc/library/__future__.rst index 8945c5d7a0eb..87e120514a10 100644 --- a/Doc/library/__future__.rst +++ b/Doc/library/__future__.rst @@ -4,6 +4,9 @@ .. module:: __future__ :synopsis: Future statement definitions +**Source code:** :source:`Lib/__future__.py` + +-------------- :mod:`__future__` is a real module, and serves three purposes: diff --git a/Doc/library/abc.rst b/Doc/library/abc.rst index 0408f3020699..ef8b08e4363f 100644 --- a/Doc/library/abc.rst +++ b/Doc/library/abc.rst @@ -9,6 +9,10 @@ .. versionadded:: 2.6 +**Source code:** :source:`Lib/abc.py` + +-------------- + This module provides the infrastructure for defining :term:`abstract base classes ` (ABCs) in Python, as outlined in :pep:`3119`; see the PEP for why this was added to Python. (See also :pep:`3141` and the :mod:`numbers` module diff --git a/Doc/library/aifc.rst b/Doc/library/aifc.rst index 0bb16356cde3..126542373f8b 100644 --- a/Doc/library/aifc.rst +++ b/Doc/library/aifc.rst @@ -10,6 +10,10 @@ single: AIFF single: AIFF-C +**Source code:** :source:`Lib/aifc.py` + +-------------- + This module provides support for reading and writing AIFF and AIFF-C files. AIFF is Audio Interchange File Format, a format for storing digital audio samples in a file. AIFF-C is a newer version of the format that includes the diff --git a/Doc/library/argparse.rst b/Doc/library/argparse.rst index d93c0d5756a4..bf0899d8abfb 100644 --- a/Doc/library/argparse.rst +++ b/Doc/library/argparse.rst @@ -4,9 +4,13 @@ .. module:: argparse :synopsis: Command-line option and argument parsing library. .. moduleauthor:: Steven Bethard -.. versionadded:: 2.7 .. sectionauthor:: Steven Bethard +.. versionadded:: 2.7 + +**Source code:** :source:`Lib/argparse.py` + +-------------- The :mod:`argparse` module makes it easy to write user-friendly command-line interfaces. The program defines what arguments it requires, and :mod:`argparse` diff --git a/Doc/library/ast.rst b/Doc/library/ast.rst index d9b22127ca90..5130d0045d5e 100644 --- a/Doc/library/ast.rst +++ b/Doc/library/ast.rst @@ -13,6 +13,9 @@ .. versionadded:: 2.6 The high-level ``ast`` module containing all helpers. +**Source code:** :source:`Lib/ast.py` + +-------------- The :mod:`ast` module helps Python applications to process trees of the Python abstract syntax grammar. The abstract syntax itself might change with each @@ -26,11 +29,6 @@ classes all inherit from :class:`ast.AST`. An abstract syntax tree can be compiled into a Python code object using the built-in :func:`compile` function. -.. seealso:: - - Latest version of the `ast module Python source code - `_ - Node classes ------------ diff --git a/Doc/library/asynchat.rst b/Doc/library/asynchat.rst index 5096e4c10d8b..6f4af41ae8cf 100644 --- a/Doc/library/asynchat.rst +++ b/Doc/library/asynchat.rst @@ -1,4 +1,3 @@ - :mod:`asynchat` --- Asynchronous socket command/response handler ================================================================ @@ -7,6 +6,9 @@ .. moduleauthor:: Sam Rushing .. sectionauthor:: Steve Holden +**Source code:** :source:`Lib/asynchat.py` + +-------------- This module builds on the :mod:`asyncore` infrastructure, simplifying asynchronous clients and servers and making it easier to handle protocols diff --git a/Doc/library/asyncore.rst b/Doc/library/asyncore.rst index 813ac21cf3c8..33f22d3fa10e 100644 --- a/Doc/library/asyncore.rst +++ b/Doc/library/asyncore.rst @@ -1,4 +1,3 @@ - :mod:`asyncore` --- Asynchronous socket handler =============================================== @@ -10,6 +9,9 @@ .. sectionauthor:: Steve Holden .. heavily adapted from original documentation by Sam Rushing +**Source code:** :source:`Lib/asyncore.py` + +-------------- This module provides the basic infrastructure for writing asynchronous socket service clients and servers. diff --git a/Doc/library/atexit.rst b/Doc/library/atexit.rst index fd884d72bb1d..c70dcf235970 100644 --- a/Doc/library/atexit.rst +++ b/Doc/library/atexit.rst @@ -1,4 +1,3 @@ - :mod:`atexit` --- Exit handlers =============================== @@ -10,17 +9,16 @@ .. versionadded:: 2.0 +**Source code:** :source:`Lib/atexit.py` + +-------------- + The :mod:`atexit` module defines a single function to register cleanup functions. Functions thus registered are automatically executed upon normal interpreter termination. The order in which the functions are called is not defined; if you have cleanup operations that depend on each other, you should wrap them in a function and register that one. This keeps :mod:`atexit` simple. -.. seealso:: - - Latest version of the `atexit Python source code - `_ - Note: the functions registered via this module are not called when the program is killed by a signal not handled by Python, when a Python fatal internal error is detected, or when :func:`os._exit` is called. diff --git a/Doc/library/basehttpserver.rst b/Doc/library/basehttpserver.rst index 4662b4f9a144..98b5ce4565e0 100644 --- a/Doc/library/basehttpserver.rst +++ b/Doc/library/basehttpserver.rst @@ -18,6 +18,10 @@ module: SimpleHTTPServer module: CGIHTTPServer +**Source code:** :source:`Lib/BaseHTTPServer.py` + +-------------- + This module defines two classes for implementing HTTP servers (Web servers). Usually, this module isn't used directly, but is used as a basis for building functioning Web servers. See the :mod:`SimpleHTTPServer` and diff --git a/Doc/library/bdb.rst b/Doc/library/bdb.rst index 93304dec70e7..bd2b16f782c5 100644 --- a/Doc/library/bdb.rst +++ b/Doc/library/bdb.rst @@ -4,6 +4,10 @@ .. module:: bdb :synopsis: Debugger framework. +**Source code:** :source:`Lib/bdb.py` + +-------------- + The :mod:`bdb` module handles basic debugger functions, like setting breakpoints or managing execution via the debugger. diff --git a/Doc/library/bisect.rst b/Doc/library/bisect.rst index 48cb3310a237..27ab526efb11 100644 --- a/Doc/library/bisect.rst +++ b/Doc/library/bisect.rst @@ -7,6 +7,12 @@ .. sectionauthor:: Raymond Hettinger .. example based on the PyModules FAQ entry by Aaron Watters +.. versionadded:: 2.1 + +**Source code:** :source:`Lib/bisect.py` + +-------------- + This module provides support for maintaining a list in sorted order without having to sort the list after each insertion. For long lists of items with expensive comparison operations, this can be an improvement over the more common @@ -14,13 +20,6 @@ approach. The module is called :mod:`bisect` because it uses a basic bisection algorithm to do its work. The source code may be most useful as a working example of the algorithm (the boundary conditions are already right!). -.. versionadded:: 2.1 - -.. seealso:: - - Latest version of the `bisect module Python source code - `_ - The following functions are provided: diff --git a/Doc/library/calendar.rst b/Doc/library/calendar.rst index 2245e513a5ea..f4f46936466b 100644 --- a/Doc/library/calendar.rst +++ b/Doc/library/calendar.rst @@ -1,4 +1,3 @@ - :mod:`calendar` --- General calendar-related functions ====================================================== @@ -7,6 +6,9 @@ program. .. sectionauthor:: Drew Csillag +**Source code:** :source:`Lib/calendar.py` + +-------------- This module allows you to output calendars like the Unix :program:`cal` program, and provides additional useful functions related to the calendar. By default, @@ -22,10 +24,6 @@ in both directions. This matches the definition of the "proleptic Gregorian" calendar in Dershowitz and Reingold's book "Calendrical Calculations", where it's the base calendar for all computations. -.. seealso:: - - Latest version of the `calendar module Python source code - `_ .. class:: Calendar([firstweekday]) diff --git a/Doc/library/cgi.rst b/Doc/library/cgi.rst index 149cf23bf10e..b95f131551a1 100644 --- a/Doc/library/cgi.rst +++ b/Doc/library/cgi.rst @@ -13,6 +13,10 @@ single: URL single: Common Gateway Interface +**Source code:** :source:`Lib/cgi.py` + +-------------- + Support module for Common Gateway Interface (CGI) scripts. This module defines a number of utilities for use by CGI scripts written in diff --git a/Doc/library/cmd.rst b/Doc/library/cmd.rst index b0508a3d203c..ea2412238b05 100644 --- a/Doc/library/cmd.rst +++ b/Doc/library/cmd.rst @@ -1,4 +1,3 @@ - :mod:`cmd` --- Support for line-oriented command interpreters ============================================================= @@ -6,17 +5,15 @@ :synopsis: Build line-oriented command interpreters. .. sectionauthor:: Eric S. Raymond +**Source code:** :source:`Lib/cmd.py` + +-------------- The :class:`Cmd` class provides a simple framework for writing line-oriented command interpreters. These are often useful for test harnesses, administrative tools, and prototypes that will later be wrapped in a more sophisticated interface. -.. seealso:: - - Latest version of the `cmd module Python source code - `_ - .. class:: Cmd([completekey[, stdin[, stdout]]]) A :class:`Cmd` instance or subclass instance is a line-oriented interpreter diff --git a/Doc/library/collections.rst b/Doc/library/collections.rst index 96895dd7acec..6fae7977bfc0 100644 --- a/Doc/library/collections.rst +++ b/Doc/library/collections.rst @@ -1,4 +1,3 @@ - :mod:`collections` --- High-performance container datatypes =========================================================== @@ -15,6 +14,10 @@ import itertools __name__ = '' +**Source code:** :source:`Lib/collections.py` and :source:`Lib/_abcoll.py` + +-------------- + This module implements specialized container datatypes providing alternatives to Python's general purpose built-in containers, :class:`dict`, :class:`list`, :class:`set`, and :class:`tuple`. @@ -32,10 +35,6 @@ In addition to the concrete container classes, the collections module provides used to test whether a class provides a particular interface, for example, whether it is hashable or a mapping. -.. seealso:: - - Latest version of the `collections module Python source code - `_ :class:`Counter` objects ------------------------ @@ -1024,9 +1023,6 @@ Notes on using :class:`Set` and :class:`MutableSet` as a mixin: .. seealso:: - * Latest version of the `Python source code for the collections abstract base classes - `_ - * `OrderedSet recipe `_ for an example built on :class:`MutableSet`. diff --git a/Doc/library/colorsys.rst b/Doc/library/colorsys.rst index 2cbc704db1ce..dbab7063e106 100644 --- a/Doc/library/colorsys.rst +++ b/Doc/library/colorsys.rst @@ -5,6 +5,9 @@ :synopsis: Conversion functions between RGB and other color systems. .. sectionauthor:: David Ascher +**Source code:** :source:`Lib/colorsys.py` + +-------------- The :mod:`colorsys` module defines bidirectional conversions of color values between colors expressed in the RGB (Red Green Blue) color space used in diff --git a/Doc/library/contextlib.rst b/Doc/library/contextlib.rst index c4350821b5ee..610c0b019d83 100644 --- a/Doc/library/contextlib.rst +++ b/Doc/library/contextlib.rst @@ -7,15 +7,14 @@ .. versionadded:: 2.5 +**Source code:** :source:`Lib/contextlib.py` + +-------------- + This module provides utilities for common tasks involving the :keyword:`with` statement. For more information see also :ref:`typecontextmanager` and :ref:`context-managers`. -.. seealso:: - - Latest version of the `contextlib Python source code - `_ - Functions provided: diff --git a/Doc/library/cookie.rst b/Doc/library/cookie.rst index de845687a72b..480dffa66e62 100644 --- a/Doc/library/cookie.rst +++ b/Doc/library/cookie.rst @@ -11,6 +11,9 @@ 3.0. The :term:`2to3` tool will automatically adapt imports when converting your sources to 3.0. +**Source code:** :source:`Lib/Cookie.py` + +-------------- The :mod:`Cookie` module defines classes for abstracting the concept of cookies, an HTTP state management mechanism. It supports both simple string-only diff --git a/Doc/library/cookielib.rst b/Doc/library/cookielib.rst index 4ca04718762f..77d66245a513 100644 --- a/Doc/library/cookielib.rst +++ b/Doc/library/cookielib.rst @@ -11,10 +11,11 @@ Python 3.0. The :term:`2to3` tool will automatically adapt imports when converting your sources to 3.0. - .. versionadded:: 2.4 +**Source code:** :source:`Lib/cookielib.py` +-------------- The :mod:`cookielib` module defines classes for automatic handling of HTTP cookies. It is useful for accessing web sites that require small pieces of data diff --git a/Doc/library/dis.rst b/Doc/library/dis.rst index 9addfe740245..8dee90163ef7 100644 --- a/Doc/library/dis.rst +++ b/Doc/library/dis.rst @@ -1,21 +1,18 @@ - :mod:`dis` --- Disassembler for Python bytecode =============================================== .. module:: dis :synopsis: Disassembler for Python bytecode. +**Source code:** :source:`Lib/dis.py` + +-------------- The :mod:`dis` module supports the analysis of CPython :term:`bytecode` by disassembling it. The CPython bytecode which this module takes as an input is defined in the file :file:`Include/opcode.h` and used by the compiler and the interpreter. -.. seealso:: - - Latest version of the `dis module Python source code - `_ - .. impl-detail:: Bytecode is an implementation detail of the CPython interpreter! No diff --git a/Doc/library/dummy_thread.rst b/Doc/library/dummy_thread.rst index 5d89760e8dbd..a4dba86bc911 100644 --- a/Doc/library/dummy_thread.rst +++ b/Doc/library/dummy_thread.rst @@ -10,6 +10,9 @@ converting your sources to 3.0; however, you should consider using the high-lever :mod:`dummy_threading` module instead. +**Source code:** :source:`Lib/dummy_thread.py` + +-------------- This module provides a duplicate interface to the :mod:`thread` module. It is meant to be imported when the :mod:`thread` module is not provided on a diff --git a/Doc/library/dummy_threading.rst b/Doc/library/dummy_threading.rst index 0ffb68732fd0..39ca061d7900 100644 --- a/Doc/library/dummy_threading.rst +++ b/Doc/library/dummy_threading.rst @@ -1,10 +1,12 @@ - :mod:`dummy_threading` --- Drop-in replacement for the :mod:`threading` module ============================================================================== .. module:: dummy_threading :synopsis: Drop-in replacement for the threading module. +**Source code:** :source:`Lib/dummy_threading.py` + +-------------- This module provides a duplicate interface to the :mod:`threading` module. It is meant to be imported when the :mod:`thread` module is not provided on a diff --git a/Doc/library/filecmp.rst b/Doc/library/filecmp.rst index 699e510438b8..25d0701af379 100644 --- a/Doc/library/filecmp.rst +++ b/Doc/library/filecmp.rst @@ -1,4 +1,3 @@ - :mod:`filecmp` --- File and Directory Comparisons ================================================= @@ -6,16 +5,14 @@ :synopsis: Compare files efficiently. .. sectionauthor:: Moshe Zadka +**Source code:** :source:`Lib/filecmp.py` + +-------------- The :mod:`filecmp` module defines functions to compare files and directories, with various optional time/correctness trade-offs. For comparing files, see also the :mod:`difflib` module. -.. seealso:: - - Latest version of the `filecmp Python source code - `_ - The :mod:`filecmp` module defines the following functions: diff --git a/Doc/library/fileinput.rst b/Doc/library/fileinput.rst index 709237e41c0d..172a643ac50a 100644 --- a/Doc/library/fileinput.rst +++ b/Doc/library/fileinput.rst @@ -6,6 +6,9 @@ .. moduleauthor:: Guido van Rossum .. sectionauthor:: Fred L. Drake, Jr. +**Source code:** :source:`Lib/fileinput.py` + +-------------- This module implements a helper class and functions to quickly write a loop over standard input or a list of files. If you just want to read or @@ -44,11 +47,6 @@ hook must be a function that takes two arguments, *filename* and *mode*, and returns an accordingly opened file-like object. Two useful hooks are already provided by this module. -.. seealso:: - - Latest version of the `fileinput Python source code - `_ - The following function is the primary interface of this module: diff --git a/Doc/library/fnmatch.rst b/Doc/library/fnmatch.rst index cb1fa106f946..49119802a65a 100644 --- a/Doc/library/fnmatch.rst +++ b/Doc/library/fnmatch.rst @@ -1,4 +1,3 @@ - :mod:`fnmatch` --- Unix filename pattern matching ================================================= @@ -10,6 +9,10 @@ .. index:: module: re +**Source code:** :source:`Lib/fnmatch.py` + +-------------- + This module provides support for Unix shell-style wildcards, which are *not* the same as regular expressions (which are documented in the :mod:`re` module). The special characters used in shell-style wildcards are: @@ -34,10 +37,6 @@ module. See module :mod:`glob` for pathname expansion (:mod:`glob` uses a period are not special for this module, and are matched by the ``*`` and ``?`` patterns. -.. seealso:: - - Latest version of the `fnmatch Python source code - `_ .. function:: fnmatch(filename, pattern) @@ -95,4 +94,3 @@ patterns. Module :mod:`glob` Unix shell-style path expansion. - diff --git a/Doc/library/fractions.rst b/Doc/library/fractions.rst index 1ca9a9c46d4a..4d10cbdd2204 100644 --- a/Doc/library/fractions.rst +++ b/Doc/library/fractions.rst @@ -1,4 +1,3 @@ - :mod:`fractions` --- Rational numbers ===================================== @@ -8,6 +7,9 @@ .. sectionauthor:: Jeffrey Yasskin .. versionadded:: 2.6 +**Source code:** :source:`Lib/fractions.py` + +-------------- The :mod:`fractions` module provides support for rational number arithmetic. diff --git a/Doc/library/ftplib.rst b/Doc/library/ftplib.rst index b6db98371f7e..b8f5b4e69593 100644 --- a/Doc/library/ftplib.rst +++ b/Doc/library/ftplib.rst @@ -9,6 +9,10 @@ pair: FTP; protocol single: FTP; ftplib (standard module) +**Source code:** :source:`Lib/ftplib.py` + +-------------- + This module defines the class :class:`FTP` and a few related items. The :class:`FTP` class implements the client side of the FTP protocol. You can use this to write Python programs that perform a variety of automated FTP jobs, such diff --git a/Doc/library/functools.rst b/Doc/library/functools.rst index 787c000951d1..10c984fd4f10 100644 --- a/Doc/library/functools.rst +++ b/Doc/library/functools.rst @@ -8,18 +8,16 @@ .. moduleauthor:: Nick Coghlan .. sectionauthor:: Peter Harris - .. versionadded:: 2.5 +**Source code:** :source:`Lib/functools.py` + +-------------- + The :mod:`functools` module is for higher-order functions: functions that act on or return other functions. In general, any callable object can be treated as a function for the purposes of this module. -.. seealso:: - - Latest version of the `functools Python source code - `_ - The :mod:`functools` module defines the following functions: .. function:: cmp_to_key(func) diff --git a/Doc/library/getopt.rst b/Doc/library/getopt.rst index 4d65c79f96a4..fb6820fdc88b 100644 --- a/Doc/library/getopt.rst +++ b/Doc/library/getopt.rst @@ -1,4 +1,3 @@ - :mod:`getopt` --- C-style parser for command line options ========================================================= @@ -6,6 +5,10 @@ :synopsis: Portable parser for command line options; support both short and long option names. +**Source code:** :source:`Lib/getopt.py` + +-------------- + .. note:: The :mod:`getopt` module is a parser for command line options whose API is designed to be familiar to users of the C :cfunc:`getopt` function. Users who diff --git a/Doc/library/gettext.rst b/Doc/library/gettext.rst index f64631f212b5..c55aaf4def85 100644 --- a/Doc/library/gettext.rst +++ b/Doc/library/gettext.rst @@ -1,4 +1,3 @@ - :mod:`gettext` --- Multilingual internationalization services ============================================================= @@ -7,6 +6,9 @@ .. moduleauthor:: Barry A. Warsaw .. sectionauthor:: Barry A. Warsaw +**Source code:** :source:`Lib/gettext.py` + +-------------- The :mod:`gettext` module provides internationalization (I18N) and localization (L10N) services for your Python modules and applications. It supports both the diff --git a/Doc/library/glob.rst b/Doc/library/glob.rst index 1ef9a310615f..68cc9f07f3c7 100644 --- a/Doc/library/glob.rst +++ b/Doc/library/glob.rst @@ -1,4 +1,3 @@ - :mod:`glob` --- Unix style pathname pattern expansion ===================================================== @@ -8,6 +7,10 @@ .. index:: single: filenames; pathname expansion +**Source code:** :source:`Lib/glob.py` + +-------------- + The :mod:`glob` module finds all the pathnames matching a specified pattern according to the rules used by the Unix shell. No tilde expansion is done, but ``*``, ``?``, and character ranges expressed with ``[]`` will be correctly @@ -16,10 +19,6 @@ matched. This is done by using the :func:`os.listdir` and subshell. (For tilde and shell variable expansion, use :func:`os.path.expanduser` and :func:`os.path.expandvars`.) -.. seealso:: - - Latest version of the `glob module Python source code - `_ .. function:: glob(pathname) diff --git a/Doc/library/gzip.rst b/Doc/library/gzip.rst index 037909bcbb36..e074bfc7032e 100644 --- a/Doc/library/gzip.rst +++ b/Doc/library/gzip.rst @@ -4,6 +4,10 @@ .. module:: gzip :synopsis: Interfaces for gzip compression and decompression using file objects. +**Source code:** :source:`Lib/gzip.py` + +-------------- + This module provides a simple interface to compress and decompress files just like the GNU programs :program:`gzip` and :program:`gunzip` would. diff --git a/Doc/library/hashlib.rst b/Doc/library/hashlib.rst index 51ac93b092dc..063ad59716b4 100644 --- a/Doc/library/hashlib.rst +++ b/Doc/library/hashlib.rst @@ -1,4 +1,3 @@ - :mod:`hashlib` --- Secure hashes and message digests ==================================================== @@ -14,6 +13,10 @@ single: message digest, MD5 single: secure hash algorithm, SHA1, SHA224, SHA256, SHA384, SHA512 +**Source code:** :source:`Lib/hashlib.py` + +-------------- + This module implements a common interface to many different secure hash and message digest algorithms. Included are the FIPS secure hash algorithms SHA1, SHA224, SHA256, SHA384, and SHA512 (defined in FIPS 180-2) as well as RSA's MD5 diff --git a/Doc/library/heapq.rst b/Doc/library/heapq.rst index fcaf28d66840..86be3bdf2350 100644 --- a/Doc/library/heapq.rst +++ b/Doc/library/heapq.rst @@ -10,14 +10,13 @@ .. versionadded:: 2.3 +**Source code:** :source:`Lib/heapq.py` + +-------------- + This module provides an implementation of the heap queue algorithm, also known as the priority queue algorithm. -.. seealso:: - - Latest version of the `heapq Python source code - `_ - Heaps are binary trees for which every parent node has a value less than or equal to any of its children. This implementation uses arrays for which ``heap[k] <= heap[2*k+1]`` and ``heap[k] <= heap[2*k+2]`` for all *k*, counting diff --git a/Doc/library/hmac.rst b/Doc/library/hmac.rst index 480d0a7b4896..968b7a4d24e0 100644 --- a/Doc/library/hmac.rst +++ b/Doc/library/hmac.rst @@ -1,4 +1,3 @@ - :mod:`hmac` --- Keyed-Hashing for Message Authentication ======================================================== @@ -10,6 +9,10 @@ .. versionadded:: 2.2 +**Source code:** :source:`Lib/hmac.py` + +-------------- + This module implements the HMAC algorithm as described by :rfc:`2104`. diff --git a/Doc/library/htmllib.rst b/Doc/library/htmllib.rst index 4e22b6f7a2c5..f253d1268ad5 100644 --- a/Doc/library/htmllib.rst +++ b/Doc/library/htmllib.rst @@ -165,6 +165,9 @@ additional methods and instance variables for use within tag methods. Python 3.0. The :term:`2to3` tool will automatically adapt imports when converting your sources to 3.0. +**Source code:** :source:`Lib/htmlentitydefs.py` + +-------------- This module defines three dictionaries, ``name2codepoint``, ``codepoint2name``, and ``entitydefs``. ``entitydefs`` is used by the :mod:`htmllib` module to diff --git a/Doc/library/htmlparser.rst b/Doc/library/htmlparser.rst index c114bf83c59d..0cdc7ca1a27e 100644 --- a/Doc/library/htmlparser.rst +++ b/Doc/library/htmlparser.rst @@ -18,6 +18,10 @@ single: HTML single: XHTML +**Source code:** :source:`Lib/HTMLParser.py` + +-------------- + This module defines a class :class:`HTMLParser` which serves as the basis for parsing text files formatted in HTML (HyperText Mark-up Language) and XHTML. Unlike the parser in :mod:`htmllib`, this parser is not based on the SGML parser diff --git a/Doc/library/httplib.rst b/Doc/library/httplib.rst index 2789c081655d..e1e3b2a83f89 100644 --- a/Doc/library/httplib.rst +++ b/Doc/library/httplib.rst @@ -16,6 +16,10 @@ .. index:: module: urllib +**Source code:** :source:`Lib/httplib.py` + +-------------- + This module defines classes which implement the client side of the HTTP and HTTPS protocols. It is normally not used directly --- the module :mod:`urllib` uses it to handle URLs that use HTTP and HTTPS. diff --git a/Doc/library/imaplib.rst b/Doc/library/imaplib.rst index 95bdc702e13d..9fcbaaae1bca 100644 --- a/Doc/library/imaplib.rst +++ b/Doc/library/imaplib.rst @@ -16,6 +16,10 @@ pair: IMAP4_SSL; protocol pair: IMAP4_stream; protocol +**Source code:** :source:`Lib/imaplib.py` + +-------------- + This module defines three classes, :class:`IMAP4`, :class:`IMAP4_SSL` and :class:`IMAP4_stream`, which encapsulate a connection to an IMAP4 server and implement a large subset of the IMAP4rev1 client protocol as defined in diff --git a/Doc/library/imghdr.rst b/Doc/library/imghdr.rst index 90a83045c394..20f789f6a504 100644 --- a/Doc/library/imghdr.rst +++ b/Doc/library/imghdr.rst @@ -1,10 +1,12 @@ - :mod:`imghdr` --- Determine the type of an image ================================================ .. module:: imghdr :synopsis: Determine the type of image contained in a file or byte stream. +**Source code:** :source:`Lib/imghdr.py` + +-------------- The :mod:`imghdr` module determines the type of image contained in a file or byte stream. diff --git a/Doc/library/inspect.rst b/Doc/library/inspect.rst index 850ff08f060f..e05618edb963 100644 --- a/Doc/library/inspect.rst +++ b/Doc/library/inspect.rst @@ -1,4 +1,3 @@ - :mod:`inspect` --- Inspect live objects ======================================= @@ -10,6 +9,10 @@ .. versionadded:: 2.1 +**Source code:** :source:`Lib/inspect.py` + +-------------- + The :mod:`inspect` module provides several useful functions to help get information about live objects such as modules, classes, methods, functions, tracebacks, frame objects, and code objects. For example, it can help you diff --git a/Doc/library/keyword.rst b/Doc/library/keyword.rst index 3b69d0b03c53..173db23544a4 100644 --- a/Doc/library/keyword.rst +++ b/Doc/library/keyword.rst @@ -1,10 +1,12 @@ - :mod:`keyword` --- Testing for Python keywords ============================================== .. module:: keyword :synopsis: Test whether a string is a keyword in Python. +**Source code:** :source:`Lib/keyword.py` + +-------------- This module allows a Python program to determine if a string is a keyword. @@ -19,9 +21,3 @@ This module allows a Python program to determine if a string is a keyword. Sequence containing all the keywords defined for the interpreter. If any keywords are defined to only be active when particular :mod:`__future__` statements are in effect, these will be included as well. - - -.. seealso:: - - Latest version of the `keyword module Python source code - `_ diff --git a/Doc/library/linecache.rst b/Doc/library/linecache.rst index 8ebee0585566..39385f9a22bc 100644 --- a/Doc/library/linecache.rst +++ b/Doc/library/linecache.rst @@ -6,17 +6,15 @@ :synopsis: This module provides random access to individual lines from text files. .. sectionauthor:: Moshe Zadka +**Source code:** :source:`Lib/linecache.py` + +-------------- The :mod:`linecache` module allows one to get any line from any file, while attempting to optimize internally, using a cache, the common case where many lines are read from a single file. This is used by the :mod:`traceback` module to retrieve source lines for inclusion in the formatted traceback. -.. seealso:: - - Latest version of the `linecache module Python source code - `_ - The :mod:`linecache` module defines the following functions: diff --git a/Doc/library/mailcap.rst b/Doc/library/mailcap.rst index 8dcb1ec6125b..5507211751ca 100644 --- a/Doc/library/mailcap.rst +++ b/Doc/library/mailcap.rst @@ -4,7 +4,9 @@ .. module:: mailcap :synopsis: Mailcap file handling. +**Source code:** :source:`Lib/mailcap.py` +-------------- Mailcap files are used to configure how MIME-aware applications such as mail readers and Web browsers react to files with different MIME types. (The name diff --git a/Doc/library/mimetypes.rst b/Doc/library/mimetypes.rst index 956a1f178e8c..69f84345e0b6 100644 --- a/Doc/library/mimetypes.rst +++ b/Doc/library/mimetypes.rst @@ -9,6 +9,10 @@ .. index:: pair: MIME; content type +**Source code:** :source:`Lib/mimetypes.py` + +-------------- + The :mod:`mimetypes` module converts between a filename or URL and the MIME type associated with the filename extension. Conversions are provided from filename to MIME type and from MIME type to filename extension; encodings are not diff --git a/Doc/library/modulefinder.rst b/Doc/library/modulefinder.rst index a086206df72e..40bf60f1907f 100644 --- a/Doc/library/modulefinder.rst +++ b/Doc/library/modulefinder.rst @@ -1,16 +1,17 @@ - :mod:`modulefinder` --- Find modules used by a script ===================================================== +.. module:: modulefinder + :synopsis: Find modules used by a script. .. sectionauthor:: A.M. Kuchling -.. module:: modulefinder - :synopsis: Find modules used by a script. - - .. versionadded:: 2.3 +**Source code:** :source:`Lib/modulefinder.py` + +-------------- + This module provides a :class:`ModuleFinder` class that can be used to determine the set of modules imported by a script. ``modulefinder.py`` can also be run as a script, giving the filename of a Python script as its argument, after which a diff --git a/Doc/library/netrc.rst b/Doc/library/netrc.rst index 8a2f1c6088f1..323fd696c2d0 100644 --- a/Doc/library/netrc.rst +++ b/Doc/library/netrc.rst @@ -10,6 +10,10 @@ .. versionadded:: 1.5.2 +**Source code:** :source:`Lib/netrc.py` + +-------------- + The :class:`netrc` class parses and encapsulates the netrc file format used by the Unix :program:`ftp` program and other FTP clients. diff --git a/Doc/library/nntplib.rst b/Doc/library/nntplib.rst index 7a461b43b661..acbb7a5d900b 100644 --- a/Doc/library/nntplib.rst +++ b/Doc/library/nntplib.rst @@ -10,6 +10,10 @@ pair: NNTP; protocol single: Network News Transfer Protocol +**Source code:** :source:`Lib/nntplib.py` + +-------------- + This module defines the class :class:`NNTP` which implements the client side of the NNTP protocol. It can be used to implement a news reader or poster, or automated news processors. For more information on NNTP (Network News Transfer diff --git a/Doc/library/optparse.rst b/Doc/library/optparse.rst index 39a44bd34b76..cb78b838627b 100644 --- a/Doc/library/optparse.rst +++ b/Doc/library/optparse.rst @@ -4,17 +4,18 @@ .. module:: optparse :synopsis: Command-line option parsing library. :deprecated: +.. moduleauthor:: Greg Ward +.. sectionauthor:: Greg Ward + +.. versionadded:: 2.3 .. deprecated:: 2.7 The :mod:`optparse` module is deprecated and will not be developed further; development will continue with the :mod:`argparse` module. -.. moduleauthor:: Greg Ward - -.. versionadded:: 2.3 - -.. sectionauthor:: Greg Ward +**Source code:** :source:`Lib/optparse.py` +-------------- :mod:`optparse` is a more convenient, flexible, and powerful library for parsing command-line options than the old :mod:`getopt` module. :mod:`optparse` uses a diff --git a/Doc/library/pickletools.rst b/Doc/library/pickletools.rst index ea1619040d39..ce47c978dbb2 100644 --- a/Doc/library/pickletools.rst +++ b/Doc/library/pickletools.rst @@ -8,6 +8,10 @@ .. versionadded:: 2.3 +**Source code:** :source:`Lib/pickletools.py` + +-------------- + This module contains various constants relating to the intimate details of the :mod:`pickle` module, some lengthy comments about the implementation, and a few useful functions for analyzing pickled data. The contents of this module are diff --git a/Doc/library/pipes.rst b/Doc/library/pipes.rst index 1f2b2ff23904..016a720470f7 100644 --- a/Doc/library/pipes.rst +++ b/Doc/library/pipes.rst @@ -1,4 +1,3 @@ - :mod:`pipes` --- Interface to shell pipelines ============================================= @@ -7,6 +6,9 @@ :synopsis: A Python interface to Unix shell pipelines. .. sectionauthor:: Moshe Zadka +**Source code:** :source:`Lib/pipes.py` + +-------------- The :mod:`pipes` module defines a class to abstract the concept of a *pipeline* --- a sequence of converters from one file to another. diff --git a/Doc/library/pkgutil.rst b/Doc/library/pkgutil.rst index 9e634d604b7b..30d4a7492a40 100644 --- a/Doc/library/pkgutil.rst +++ b/Doc/library/pkgutil.rst @@ -1,15 +1,18 @@ - :mod:`pkgutil` --- Package extension utility ============================================ .. module:: pkgutil :synopsis: Utilities for the import system. +.. versionadded:: 2.3 + +**Source code:** :source:`Lib/pkgutil.py` + +-------------- + This module provides utilities for the import system, in particular package support. -.. versionadded:: 2.3 - .. function:: extend_path(path, name) diff --git a/Doc/library/platform.rst b/Doc/library/platform.rst index 069993c36922..0b78d492be0b 100644 --- a/Doc/library/platform.rst +++ b/Doc/library/platform.rst @@ -9,6 +9,10 @@ .. versionadded:: 2.3 +**Source code:** :source:`Lib/platform.py` + +-------------- + .. note:: Specific platforms listed alphabetically, with Linux included in the Unix diff --git a/Doc/library/plistlib.rst b/Doc/library/plistlib.rst index 309ddeca5851..11268c2babab 100644 --- a/Doc/library/plistlib.rst +++ b/Doc/library/plistlib.rst @@ -15,6 +15,10 @@ pair: plist; file single: property list +**Source code:** :source:`Lib/plistlib.py` + +-------------- + This module provides an interface for reading and writing the "property list" XML files used mainly by Mac OS X. diff --git a/Doc/library/poplib.rst b/Doc/library/poplib.rst index e5f693d28837..84563040ea38 100644 --- a/Doc/library/poplib.rst +++ b/Doc/library/poplib.rst @@ -1,4 +1,3 @@ - :mod:`poplib` --- POP3 protocol client ====================================== @@ -9,6 +8,10 @@ .. index:: pair: POP3; protocol +**Source code:** :source:`Lib/poplib.py` + +-------------- + This module defines a class, :class:`POP3`, which encapsulates a connection to a POP3 server and implements the protocol as defined in :rfc:`1725`. The :class:`POP3` class supports both the minimal and optional command sets. diff --git a/Doc/library/pprint.rst b/Doc/library/pprint.rst index 7f1302915394..a0a72005c1fe 100644 --- a/Doc/library/pprint.rst +++ b/Doc/library/pprint.rst @@ -1,4 +1,3 @@ - :mod:`pprint` --- Data pretty printer ===================================== @@ -7,6 +6,9 @@ .. moduleauthor:: Fred L. Drake, Jr. .. sectionauthor:: Fred L. Drake, Jr. +**Source code:** :source:`Lib/pprint.py` + +-------------- The :mod:`pprint` module provides a capability to "pretty-print" arbitrary Python data structures in a form which can be used as input to the interpreter. @@ -28,10 +30,6 @@ width constraint. .. versionchanged:: 2.6 Added support for :class:`set` and :class:`frozenset`. -.. seealso:: - - Latest version of the `pprint module Python source code - `_ The :mod:`pprint` module defines one class: diff --git a/Doc/library/profile.rst b/Doc/library/profile.rst index 87e2fbe2e9ea..236324d2e8c9 100644 --- a/Doc/library/profile.rst +++ b/Doc/library/profile.rst @@ -1,4 +1,3 @@ - .. _profile: ******************** @@ -10,6 +9,9 @@ The Python Profilers .. module:: profile :synopsis: Python source profiler. +**Source code:** :source:`Lib/profile.py` and :source:`Lib/pstats.py` + +-------------- .. _profiler-introduction: diff --git a/Doc/library/py_compile.rst b/Doc/library/py_compile.rst index ca86143eab46..66f015bbef0b 100644 --- a/Doc/library/py_compile.rst +++ b/Doc/library/py_compile.rst @@ -8,6 +8,10 @@ .. index:: pair: file; byte-code +**Source code:** :source:`Lib/py_compile.py` + +-------------- + The :mod:`py_compile` module provides a function to generate a byte-code file from a source file, and another function used when the module source file is invoked as a script. diff --git a/Doc/library/pyclbr.rst b/Doc/library/pyclbr.rst index dd6c0ae1e4a2..2f81451e9fef 100644 --- a/Doc/library/pyclbr.rst +++ b/Doc/library/pyclbr.rst @@ -1,4 +1,3 @@ - :mod:`pyclbr` --- Python class browser support ============================================== @@ -6,6 +5,9 @@ :synopsis: Supports information extraction for a Python class browser. .. sectionauthor:: Fred L. Drake, Jr. +**Source code:** :source:`Lib/pyclbr.py` + +-------------- The :mod:`pyclbr` module can be used to determine some limited information about the classes, methods and top-level functions defined in a module. The diff --git a/Doc/library/pydoc.rst b/Doc/library/pydoc.rst index e5f8fe24cc10..8343452b95ae 100644 --- a/Doc/library/pydoc.rst +++ b/Doc/library/pydoc.rst @@ -1,4 +1,3 @@ - :mod:`pydoc` --- Documentation generator and online help system =============================================================== @@ -15,6 +14,10 @@ single: documentation; online single: help; online +**Source code:** :source:`Lib/pydoc.py` + +-------------- + The :mod:`pydoc` module automatically generates documentation from Python modules. The documentation can be presented as pages of text on the console, served to a Web browser, or saved to HTML files. diff --git a/Doc/library/queue.rst b/Doc/library/queue.rst index 654f07a7acc2..36ff34693623 100644 --- a/Doc/library/queue.rst +++ b/Doc/library/queue.rst @@ -9,6 +9,9 @@ :term:`2to3` tool will automatically adapt imports when converting your sources to 3.0. +**Source code:** :source:`Lib/Queue.py` + +-------------- The :mod:`Queue` module implements multi-producer, multi-consumer queues. It is especially useful in threaded programming when information must be @@ -24,11 +27,6 @@ the first retrieved (operating like a stack). With a priority queue, the entries are kept sorted (using the :mod:`heapq` module) and the lowest valued entry is retrieved first. -.. seealso:: - - Latest version of the `Queue module Python source code - `_. - The :mod:`Queue` module defines the following classes and exceptions: .. class:: Queue(maxsize=0) diff --git a/Doc/library/quopri.rst b/Doc/library/quopri.rst index 87d70c382c68..67cbaba89b79 100644 --- a/Doc/library/quopri.rst +++ b/Doc/library/quopri.rst @@ -1,4 +1,3 @@ - :mod:`quopri` --- Encode and decode MIME quoted-printable data ============================================================== @@ -10,6 +9,10 @@ pair: quoted-printable; encoding single: MIME; quoted-printable encoding +**Source code:** :source:`Lib/quopri.py` + +-------------- + This module performs quoted-printable transport encoding and decoding, as defined in :rfc:`1521`: "MIME (Multipurpose Internet Mail Extensions) Part One: Mechanisms for Specifying and Describing the Format of Internet Message Bodies". @@ -18,11 +21,6 @@ few nonprintable characters; the base64 encoding scheme available via the :mod:`base64` module is more compact if there are many such characters, as when sending a graphics file. -.. seealso:: - - Latest version of the `quopri module Python source code - `_ - .. function:: decode(input, output[,header]) Decode the contents of the *input* file and write the resulting decoded binary diff --git a/Doc/library/random.rst b/Doc/library/random.rst index 4306911dfc2b..e18b217c90f1 100644 --- a/Doc/library/random.rst +++ b/Doc/library/random.rst @@ -1,19 +1,16 @@ - :mod:`random` --- Generate pseudo-random numbers ================================================ .. module:: random :synopsis: Generate pseudo-random numbers with various common distributions. +**Source code:** :source:`Lib/random.py` + +-------------- This module implements pseudo-random number generators for various distributions. -.. seealso:: - - Latest version of the `random module Python source code - `_ - For integers, uniform selection from a range. For sequences, uniform selection of a random element, a function to generate a random permutation of a list in-place, and a function for random sampling without replacement. diff --git a/Doc/library/repr.rst b/Doc/library/repr.rst index b4e03ff8551d..11e6ae20ca78 100644 --- a/Doc/library/repr.rst +++ b/Doc/library/repr.rst @@ -1,4 +1,3 @@ - :mod:`repr` --- Alternate :func:`repr` implementation ===================================================== @@ -11,15 +10,14 @@ :term:`2to3` tool will automatically adapt imports when converting your sources to 3.0. +**Source code:** :source:`Lib/repr.py` + +-------------- + The :mod:`repr` module provides a means for producing object representations with limits on the size of the resulting strings. This is used in the Python debugger and may be useful in other contexts as well. -.. seealso:: - - Latest version of the `repr module Python source code - `_ - This module provides a class, an instance, and a function: diff --git a/Doc/library/rlcompleter.rst b/Doc/library/rlcompleter.rst index 85a9d79260df..318b3ead7733 100644 --- a/Doc/library/rlcompleter.rst +++ b/Doc/library/rlcompleter.rst @@ -1,4 +1,3 @@ - :mod:`rlcompleter` --- Completion function for GNU readline =========================================================== @@ -6,6 +5,9 @@ :synopsis: Python identifier completion, suitable for the GNU readline library. .. sectionauthor:: Moshe Zadka +**Source code:** :source:`Lib/rlcompleter.py` + +-------------- The :mod:`rlcompleter` module defines a completion function suitable for the :mod:`readline` module by completing valid Python identifiers and keywords. diff --git a/Doc/library/runpy.rst b/Doc/library/runpy.rst index 905c64b46a7d..31562feae056 100644 --- a/Doc/library/runpy.rst +++ b/Doc/library/runpy.rst @@ -8,6 +8,10 @@ .. versionadded:: 2.5 +**Source code:** :source:`Lib/runpy.py` + +-------------- + The :mod:`runpy` module is used to locate and run Python modules without importing them first. Its main use is to implement the :option:`-m` command line switch that allows scripts to be located using the Python module diff --git a/Doc/library/sched.rst b/Doc/library/sched.rst index 1efe47ac0d47..824df040861e 100644 --- a/Doc/library/sched.rst +++ b/Doc/library/sched.rst @@ -7,14 +7,13 @@ .. index:: single: event scheduling +**Source code:** :source:`Lib/sched.py` + +-------------- + The :mod:`sched` module defines a class which implements a general purpose event scheduler: -.. seealso:: - - Latest version of the `sched module Python source code - `_ - .. class:: scheduler(timefunc, delayfunc) The :class:`scheduler` class defines a generic interface to scheduling events. diff --git a/Doc/library/shelve.rst b/Doc/library/shelve.rst index 4f2d94be7547..7a70ff4d735f 100644 --- a/Doc/library/shelve.rst +++ b/Doc/library/shelve.rst @@ -7,16 +7,16 @@ .. index:: module: pickle +**Source code:** :source:`Lib/shelve.py` + +-------------- + A "shelf" is a persistent, dictionary-like object. The difference with "dbm" databases is that the values (not the keys!) in a shelf can be essentially arbitrary Python objects --- anything that the :mod:`pickle` module can handle. This includes most class instances, recursive data types, and objects containing lots of shared sub-objects. The keys are ordinary strings. -.. seealso:: - - Latest version of the `shelve module Python source code - `_ .. function:: open(filename[, flag='c'[, protocol=None[, writeback=False]]]) diff --git a/Doc/library/shlex.rst b/Doc/library/shlex.rst index 3e6d9f1c6a7e..f4622442e47f 100644 --- a/Doc/library/shlex.rst +++ b/Doc/library/shlex.rst @@ -1,4 +1,3 @@ - :mod:`shlex` --- Simple lexical analysis ======================================== @@ -12,6 +11,11 @@ .. versionadded:: 1.5.2 +**Source code:** :source:`Lib/shlex.py` + +-------------- + + The :class:`shlex` class makes it easy to write lexical analyzers for simple syntaxes resembling that of the Unix shell. This will often be useful for writing minilanguages, (for example, in run control files for Python diff --git a/Doc/library/shutil.rst b/Doc/library/shutil.rst index cb0a9ae9336c..98b249f2ca22 100644 --- a/Doc/library/shutil.rst +++ b/Doc/library/shutil.rst @@ -1,4 +1,3 @@ - :mod:`shutil` --- High-level file operations ============================================ @@ -11,16 +10,15 @@ single: file; copying single: copying files +**Source code:** :source:`Lib/shutil.py` + +-------------- + The :mod:`shutil` module offers a number of high-level operations on files and collections of files. In particular, functions are provided which support file copying and removal. For operations on individual files, see also the :mod:`os` module. -.. seealso:: - - Latest version of the `shutil module Python source code - `_ - .. warning:: Even the higher-level file copying functions (:func:`copy`, :func:`copy2`) diff --git a/Doc/library/simplexmlrpcserver.rst b/Doc/library/simplexmlrpcserver.rst index c0819bfbf875..3618728ac1ee 100644 --- a/Doc/library/simplexmlrpcserver.rst +++ b/Doc/library/simplexmlrpcserver.rst @@ -14,6 +14,10 @@ .. versionadded:: 2.2 +**Source code:** :source:`Lib/SimpleXMLRPCServer.py` + +-------------- + The :mod:`SimpleXMLRPCServer` module provides a basic server framework for XML-RPC servers written in Python. Servers can either be free standing, using :class:`SimpleXMLRPCServer`, or embedded in a CGI environment, using diff --git a/Doc/library/site.rst b/Doc/library/site.rst index 6ad156ea396e..e35eeee5f390 100644 --- a/Doc/library/site.rst +++ b/Doc/library/site.rst @@ -1,10 +1,12 @@ - :mod:`site` --- Site-specific configuration hook ================================================ .. module:: site :synopsis: A standard way to reference site-specific modules. +**Source code:** :source:`Lib/site.py` + +-------------- **This module is automatically imported during initialization.** The automatic import can be suppressed using the interpreter's :option:`-S` option. diff --git a/Doc/library/smtpd.rst b/Doc/library/smtpd.rst index 276751634d1a..ebb0b302d226 100644 --- a/Doc/library/smtpd.rst +++ b/Doc/library/smtpd.rst @@ -7,8 +7,9 @@ .. moduleauthor:: Barry Warsaw .. sectionauthor:: Moshe Zadka +**Source code:** :source:`Lib/smtpd.py` - +-------------- This module offers several classes to implement SMTP servers. One is a generic do-nothing implementation, which can be overridden, while the other two offer diff --git a/Doc/library/smtplib.rst b/Doc/library/smtplib.rst index d59ebf7398b8..b0b58e8e8a11 100644 --- a/Doc/library/smtplib.rst +++ b/Doc/library/smtplib.rst @@ -1,4 +1,3 @@ - :mod:`smtplib` --- SMTP protocol client ======================================= @@ -11,6 +10,10 @@ pair: SMTP; protocol single: Simple Mail Transfer Protocol +**Source code:** :source:`Lib/smtplib.py` + +-------------- + The :mod:`smtplib` module defines an SMTP client session object that can be used to send mail to any Internet machine with an SMTP or ESMTP listener daemon. For details of SMTP and ESMTP operation, consult :rfc:`821` (Simple Mail Transfer diff --git a/Doc/library/sndhdr.rst b/Doc/library/sndhdr.rst index 01a3917a32c5..f36df6870347 100644 --- a/Doc/library/sndhdr.rst +++ b/Doc/library/sndhdr.rst @@ -1,4 +1,3 @@ - :mod:`sndhdr` --- Determine type of sound file ============================================== @@ -11,6 +10,10 @@ single: A-LAW single: u-LAW +**Source code:** :source:`Lib/sndhdr.py` + +-------------- + The :mod:`sndhdr` provides utility functions which attempt to determine the type of sound data which is in a file. When these functions are able to determine what type of sound data is stored in a file, they return a tuple ``(type, diff --git a/Doc/library/socketserver.rst b/Doc/library/socketserver.rst index b7bd91ff0b24..4c48267b0aef 100644 --- a/Doc/library/socketserver.rst +++ b/Doc/library/socketserver.rst @@ -1,4 +1,3 @@ - :mod:`SocketServer` --- A framework for network servers ======================================================= @@ -11,6 +10,9 @@ Python 3.0. The :term:`2to3` tool will automatically adapt imports when converting your sources to 3.0. +**Source code:** :source:`Lib/SocketServer.py` + +-------------- The :mod:`SocketServer` module simplifies the task of writing network servers. diff --git a/Doc/library/ssl.rst b/Doc/library/ssl.rst index f4cac3a14a5f..482ef0843c65 100644 --- a/Doc/library/ssl.rst +++ b/Doc/library/ssl.rst @@ -5,9 +5,6 @@ :synopsis: TLS/SSL wrapper for socket objects .. moduleauthor:: Bill Janssen - -.. versionadded:: 2.6 - .. sectionauthor:: Bill Janssen @@ -15,6 +12,12 @@ .. index:: TLS, SSL, Transport Layer Security, Secure Sockets Layer +.. versionadded:: 2.6 + +**Source code:** :source:`Lib/ssl.py` + +-------------- + This module provides access to Transport Layer Security (often known as "Secure Sockets Layer") encryption and peer authentication facilities for network sockets, both client-side and server-side. This module uses the OpenSSL diff --git a/Doc/library/stat.rst b/Doc/library/stat.rst index a62d9da10749..8fd90daad606 100644 --- a/Doc/library/stat.rst +++ b/Doc/library/stat.rst @@ -1,4 +1,3 @@ - :mod:`stat` --- Interpreting :func:`stat` results ================================================= @@ -6,6 +5,9 @@ :synopsis: Utilities for interpreting the results of os.stat(), os.lstat() and os.fstat(). .. sectionauthor:: Skip Montanaro +**Source code:** :source:`Lib/stat.py` + +-------------- The :mod:`stat` module defines constants and functions for interpreting the results of :func:`os.stat`, :func:`os.fstat` and :func:`os.lstat` (if they diff --git a/Doc/library/string.rst b/Doc/library/string.rst index d785b7bb89f5..9ee81b596cb3 100644 --- a/Doc/library/string.rst +++ b/Doc/library/string.rst @@ -7,6 +7,10 @@ .. index:: module: re +**Source code:** :source:`Lib/string.py` + +-------------- + The :mod:`string` module contains a number of useful constants and classes, as well as some deprecated legacy functions that are also available as methods on strings. In addition, Python's built-in string @@ -17,12 +21,6 @@ template strings or the ``%`` operator described in the :ref:`string-formatting` section. Also, see the :mod:`re` module for string functions based on regular expressions. -.. seealso:: - - Latest version of the `string module Python source code - `_ - - String constants ---------------- diff --git a/Doc/library/sunau.rst b/Doc/library/sunau.rst index 3f231b495281..4bdb99bea616 100644 --- a/Doc/library/sunau.rst +++ b/Doc/library/sunau.rst @@ -1,4 +1,3 @@ - :mod:`sunau` --- Read and write Sun AU files ============================================ @@ -6,6 +5,9 @@ :synopsis: Provide an interface to the Sun AU sound format. .. sectionauthor:: Moshe Zadka +**Source code:** :source:`Lib/sunau.py` + +-------------- The :mod:`sunau` module provides a convenient interface to the Sun AU sound format. Note that this module is interface-compatible with the modules diff --git a/Doc/library/symbol.rst b/Doc/library/symbol.rst index 1735276fbeeb..75a47923a80b 100644 --- a/Doc/library/symbol.rst +++ b/Doc/library/symbol.rst @@ -1,4 +1,3 @@ - :mod:`symbol` --- Constants used with Python parse trees ======================================================== @@ -6,6 +5,9 @@ :synopsis: Constants representing internal nodes of the parse tree. .. sectionauthor:: Fred L. Drake, Jr. +**Source code:** :source:`Lib/symbol.py` + +-------------- This module provides constants which represent the numeric values of internal nodes of the parse tree. Unlike most Python constants, these use lower-case diff --git a/Doc/library/sysconfig.rst b/Doc/library/sysconfig.rst index 38aae0a4072b..5ba6fa26f270 100644 --- a/Doc/library/sysconfig.rst +++ b/Doc/library/sysconfig.rst @@ -5,10 +5,15 @@ :synopsis: Python's configuration information .. moduleauthor:: Tarek Ziade .. sectionauthor:: Tarek Ziade -.. versionadded:: 2.7 .. index:: single: configuration information +.. versionadded:: 2.7 + +**Source code:** :source:`Lib/sysconfig.py` + +-------------- + The :mod:`sysconfig` module provides access to Python's configuration information like the list of installation paths and the configuration variables relevant for the current platform. diff --git a/Doc/library/tabnanny.rst b/Doc/library/tabnanny.rst index b86971df33b3..f447f1207ebe 100644 --- a/Doc/library/tabnanny.rst +++ b/Doc/library/tabnanny.rst @@ -9,6 +9,10 @@ .. rudimentary documentation based on module comments +**Source code:** :source:`Lib/tabnanny.py` + +-------------- + For the time being this module is intended to be called as a script. However it is possible to import it into an IDE and use the function :func:`check` described below. diff --git a/Doc/library/tarfile.rst b/Doc/library/tarfile.rst index 854ed7466a9e..5502adce74fc 100644 --- a/Doc/library/tarfile.rst +++ b/Doc/library/tarfile.rst @@ -10,6 +10,9 @@ .. moduleauthor:: Lars Gustäbel .. sectionauthor:: Lars Gustäbel +**Source code:** :source:`Lib/tarfile.py` + +-------------- The :mod:`tarfile` module makes it possible to read and write tar archives, including those using gzip or bz2 compression. diff --git a/Doc/library/telnetlib.rst b/Doc/library/telnetlib.rst index 925eccc63b00..f6340a99edbc 100644 --- a/Doc/library/telnetlib.rst +++ b/Doc/library/telnetlib.rst @@ -1,4 +1,3 @@ - :mod:`telnetlib` --- Telnet client ================================== @@ -9,6 +8,10 @@ .. index:: single: protocol; Telnet +**Source code:** :source:`Lib/telnetlib.py` + +-------------- + The :mod:`telnetlib` module provides a :class:`Telnet` class that implements the Telnet protocol. See :rfc:`854` for details about the protocol. In addition, it provides symbolic constants for the protocol characters (see below), and for the diff --git a/Doc/library/tempfile.rst b/Doc/library/tempfile.rst index 7ef8a2f6e083..936f06a0cafc 100644 --- a/Doc/library/tempfile.rst +++ b/Doc/library/tempfile.rst @@ -1,4 +1,3 @@ - :mod:`tempfile` --- Generate temporary files and directories ============================================================ @@ -13,6 +12,10 @@ pair: temporary; file name pair: temporary; file +**Source code:** :source:`Lib/tempfile.py` + +-------------- + This module generates temporary files and directories. It works on all supported platforms. diff --git a/Doc/library/textwrap.rst b/Doc/library/textwrap.rst index 8fbfe9c1c10f..84e6ee1d093b 100644 --- a/Doc/library/textwrap.rst +++ b/Doc/library/textwrap.rst @@ -1,4 +1,3 @@ - :mod:`textwrap` --- Text wrapping and filling ============================================= @@ -7,20 +6,18 @@ .. moduleauthor:: Greg Ward .. sectionauthor:: Greg Ward - .. versionadded:: 2.3 +**Source code:** :source:`Lib/textwrap.py` + +-------------- + The :mod:`textwrap` module provides two convenience functions, :func:`wrap` and :func:`fill`, as well as :class:`TextWrapper`, the class that does all the work, and a utility function :func:`dedent`. If you're just wrapping or filling one or two text strings, the convenience functions should be good enough; otherwise, you should use an instance of :class:`TextWrapper` for efficiency. -.. seealso:: - - Latest version of the `textwrap module Python source code - `_ - .. function:: wrap(text[, width[, ...]]) Wraps the single paragraph in *text* (a string) so every line is at most *width* diff --git a/Doc/library/threading.rst b/Doc/library/threading.rst index 0b4634934291..9544466b10c0 100644 --- a/Doc/library/threading.rst +++ b/Doc/library/threading.rst @@ -4,6 +4,9 @@ .. module:: threading :synopsis: Higher-level threading interface. +**Source code:** :source:`Lib/threading.py` + +-------------- This module constructs higher-level threading interfaces on top of the lower level :mod:`thread` module. @@ -36,11 +39,6 @@ The :mod:`dummy_threading` module is provided for situations where :mod:`multiprocessing`. However, threading is still an appropriate model if you want to run multiple I/O-bound tasks simultaneously. -.. seealso:: - - Latest version of the `threading module Python source code - `_ - This module defines the following functions and objects: diff --git a/Doc/library/timeit.rst b/Doc/library/timeit.rst index 21f9796cd93b..7fbe19e9fc63 100644 --- a/Doc/library/timeit.rst +++ b/Doc/library/timeit.rst @@ -1,4 +1,3 @@ - :mod:`timeit` --- Measure execution time of small code snippets =============================================================== @@ -12,6 +11,10 @@ single: Benchmarking single: Performance +**Source code:** :source:`Lib/timeit.py` + +-------------- + This module provides a simple way to time small bits of Python code. It has both command line as well as callable interfaces. It avoids a number of common traps for measuring execution times. See also Tim Peters' introduction to the diff --git a/Doc/library/token.rst b/Doc/library/token.rst index 00972b096ed6..4b98eac92811 100644 --- a/Doc/library/token.rst +++ b/Doc/library/token.rst @@ -1,4 +1,3 @@ - :mod:`token` --- Constants used with Python parse trees ======================================================= @@ -6,6 +5,9 @@ :synopsis: Constants representing terminal nodes of the parse tree. .. sectionauthor:: Fred L. Drake, Jr. +**Source code:** :source:`Lib/token.py` + +-------------- This module provides constants which represent the numeric values of leaf nodes of the parse tree (terminal tokens). Refer to the file :file:`Grammar/Grammar` diff --git a/Doc/library/tokenize.rst b/Doc/library/tokenize.rst index 2a7dea10251d..30677eaadce7 100644 --- a/Doc/library/tokenize.rst +++ b/Doc/library/tokenize.rst @@ -1,4 +1,3 @@ - :mod:`tokenize` --- Tokenizer for Python source =============================================== @@ -7,17 +6,15 @@ .. moduleauthor:: Ka Ping Yee .. sectionauthor:: Fred L. Drake, Jr. +**Source code:** :source:`Lib/tokenize.py` + +-------------- The :mod:`tokenize` module provides a lexical scanner for Python source code, implemented in Python. The scanner in this module returns comments as tokens as well, making it useful for implementing "pretty-printers," including colorizers for on-screen displays. -.. seealso:: - - Latest version of the `tokenize module Python source code - `_ - The primary entry point is a :term:`generator`: .. function:: generate_tokens(readline) diff --git a/Doc/library/trace.rst b/Doc/library/trace.rst index 2e9d2b4d8613..a2afda184331 100644 --- a/Doc/library/trace.rst +++ b/Doc/library/trace.rst @@ -1,21 +1,18 @@ - :mod:`trace` --- Trace or track Python statement execution ========================================================== .. module:: trace :synopsis: Trace or track Python statement execution. +**Source code:** :source:`Lib/trace.py` + +-------------- The :mod:`trace` module allows you to trace program execution, generate annotated statement coverage listings, print caller/callee relationships and list functions executed during a program run. It can be used in another program or from the command line. -.. seealso:: - - Latest version of the `trace module Python source code - `_ - .. _trace-cli: Command-Line Usage diff --git a/Doc/library/types.rst b/Doc/library/types.rst index 637704be7684..77cf014dc1de 100644 --- a/Doc/library/types.rst +++ b/Doc/library/types.rst @@ -4,6 +4,9 @@ .. module:: types :synopsis: Names for built-in types. +**Source code:** :source:`Lib/types.py` + +-------------- This module defines names for some object types that are used by the standard Python interpreter, but not for the types defined by various extension modules. diff --git a/Doc/library/urlparse.rst b/Doc/library/urlparse.rst index 88dafa97c538..f118845e8ed6 100644 --- a/Doc/library/urlparse.rst +++ b/Doc/library/urlparse.rst @@ -17,6 +17,9 @@ The :term:`2to3` tool will automatically adapt imports when converting your sources to 3.0. +**Source code:** :source:`Lib/urlparse.py` + +-------------- This module defines a standard interface to break Uniform Resource Locator (URL) strings up in components (addressing scheme, network location, path etc.), to @@ -33,11 +36,6 @@ following URL schemes: ``file``, ``ftp``, ``gopher``, ``hdl``, ``http``, .. versionadded:: 2.5 Support for the ``sftp`` and ``sips`` schemes. -.. seealso:: - - Latest version of the `urlparse module Python source code - `_ - The :mod:`urlparse` module defines the following functions: diff --git a/Doc/library/userdict.rst b/Doc/library/userdict.rst index ab9ab042761e..1c756742cd52 100644 --- a/Doc/library/userdict.rst +++ b/Doc/library/userdict.rst @@ -1,4 +1,3 @@ - :mod:`UserDict` --- Class wrapper for dictionary objects ======================================================== @@ -6,6 +5,10 @@ :synopsis: Class wrapper for dictionary objects. +**Source code:** :source:`Lib/UserDict.py` + +-------------- + The module defines a mixin, :class:`DictMixin`, defining all dictionary methods for classes that already have a minimum mapping interface. This greatly simplifies writing classes that need to be substitutable for dictionaries (such @@ -19,11 +22,6 @@ available starting with Python version 2.2). Prior to the introduction of sub-classes that obtained new behaviors by overriding existing methods or adding new ones. -.. seealso:: - - Latest version of the `UserDict Python source code - `_ - The :mod:`UserDict` module defines the :class:`UserDict` class and :class:`DictMixin`: diff --git a/Doc/library/uu.rst b/Doc/library/uu.rst index fa1477b3452a..1608d4112c19 100644 --- a/Doc/library/uu.rst +++ b/Doc/library/uu.rst @@ -1,4 +1,3 @@ - :mod:`uu` --- Encode and decode uuencode files ============================================== @@ -6,6 +5,9 @@ :synopsis: Encode and decode files in uuencode format. .. moduleauthor:: Lance Ellinghouse +**Source code:** :source:`Lib/uu.py` + +-------------- This module encodes and decodes files in uuencode format, allowing arbitrary binary data to be transferred over ASCII-only connections. Wherever a file @@ -22,11 +24,6 @@ that, when required, the mode is ``'rb'`` or ``'wb'`` on Windows. This code was contributed by Lance Ellinghouse, and modified by Jack Jansen. -.. seealso:: - - Latest version of the `uu module Python source code - `_ - The :mod:`uu` module defines the following functions: @@ -62,4 +59,3 @@ The :mod:`uu` module defines the following functions: Module :mod:`binascii` Support module containing ASCII-to-binary and binary-to-ASCII conversions. - diff --git a/Doc/library/warnings.rst b/Doc/library/warnings.rst index b3c1994d3488..dbcf148995e9 100644 --- a/Doc/library/warnings.rst +++ b/Doc/library/warnings.rst @@ -9,6 +9,10 @@ .. versionadded:: 2.1 +**Source code:** :source:`Lib/warnings.py` + +-------------- + Warning messages are typically issued in situations where it is useful to alert the user of some condition in a program, where that condition (normally) doesn't warrant raising an exception and terminating the program. For example, one diff --git a/Doc/library/wave.rst b/Doc/library/wave.rst index c1db5230737f..93ea5e086c50 100644 --- a/Doc/library/wave.rst +++ b/Doc/library/wave.rst @@ -6,6 +6,10 @@ .. sectionauthor:: Moshe Zadka .. Documentations stolen from comments in file. +**Source code:** :source:`Lib/wave.py` + +-------------- + The :mod:`wave` module provides a convenient interface to the WAV sound format. It does not support compression/decompression, but it does support mono/stereo. diff --git a/Doc/library/weakref.rst b/Doc/library/weakref.rst index 9c655871b5ed..7929c5179e59 100644 --- a/Doc/library/weakref.rst +++ b/Doc/library/weakref.rst @@ -11,6 +11,10 @@ .. versionadded:: 2.1 +**Source code:** :source:`Lib/weakref.py` + +-------------- + The :mod:`weakref` module allows the Python programmer to create :dfn:`weak references` to objects. diff --git a/Doc/library/webbrowser.rst b/Doc/library/webbrowser.rst index 74e12a2c5871..1a27d07b23fc 100644 --- a/Doc/library/webbrowser.rst +++ b/Doc/library/webbrowser.rst @@ -1,4 +1,3 @@ - :mod:`webbrowser` --- Convenient Web-browser controller ======================================================= @@ -7,6 +6,9 @@ .. moduleauthor:: Fred L. Drake, Jr. .. sectionauthor:: Fred L. Drake, Jr. +**Source code:** :source:`Lib/webbrowser.py` + +-------------- The :mod:`webbrowser` module provides a high-level interface to allow displaying Web-based documents to users. Under most circumstances, simply calling the diff --git a/Doc/library/xdrlib.rst b/Doc/library/xdrlib.rst index 34d881d9783f..e56650cd3aff 100644 --- a/Doc/library/xdrlib.rst +++ b/Doc/library/xdrlib.rst @@ -1,4 +1,3 @@ - :mod:`xdrlib` --- Encode and decode XDR data ============================================ @@ -10,6 +9,10 @@ single: XDR single: External Data Representation +**Source code:** :source:`Lib/xdrlib.py` + +-------------- + The :mod:`xdrlib` module supports the External Data Representation Standard as described in :rfc:`1014`, written by Sun Microsystems, Inc. June 1987. It supports most of the data types described in the RFC. diff --git a/Doc/library/xml.dom.minidom.rst b/Doc/library/xml.dom.minidom.rst index 064ddd48132b..69e9e56a1fd4 100644 --- a/Doc/library/xml.dom.minidom.rst +++ b/Doc/library/xml.dom.minidom.rst @@ -1,4 +1,3 @@ - :mod:`xml.dom.minidom` --- Lightweight DOM implementation ========================================================= @@ -11,6 +10,10 @@ .. versionadded:: 2.0 +**Source code:** :source:`Lib/xml/dom/minidom.py` + +-------------- + :mod:`xml.dom.minidom` is a light-weight implementation of the Document Object Model interface. It is intended to be simpler than the full DOM and also significantly smaller. diff --git a/Doc/library/xml.dom.pulldom.rst b/Doc/library/xml.dom.pulldom.rst index 80a91b8ec7fe..bad0daa7335f 100644 --- a/Doc/library/xml.dom.pulldom.rst +++ b/Doc/library/xml.dom.pulldom.rst @@ -1,4 +1,3 @@ - :mod:`xml.dom.pulldom` --- Support for building partial DOM trees ================================================================= @@ -9,6 +8,10 @@ .. versionadded:: 2.0 +**Source code:** :source:`Lib/xml/dom/pulldom.py` + +-------------- + :mod:`xml.dom.pulldom` allows building only selected portions of a Document Object Model representation of a document from SAX events. diff --git a/Doc/library/xml.etree.elementtree.rst b/Doc/library/xml.etree.elementtree.rst index def46696908b..a40fb65ee6eb 100644 --- a/Doc/library/xml.etree.elementtree.rst +++ b/Doc/library/xml.etree.elementtree.rst @@ -1,4 +1,3 @@ - :mod:`xml.etree.ElementTree` --- The ElementTree XML API ======================================================== @@ -9,6 +8,10 @@ .. versionadded:: 2.5 +**Source code:** :source:`Lib/xml/etree/ElementTree.py` + +-------------- + The :class:`Element` type is a flexible container object, designed to store hierarchical data structures in memory. The type can be described as a cross between a list and a dictionary. diff --git a/Doc/library/xmlrpclib.rst b/Doc/library/xmlrpclib.rst index 02011e87c138..320e01982164 100644 --- a/Doc/library/xmlrpclib.rst +++ b/Doc/library/xmlrpclib.rst @@ -17,6 +17,10 @@ .. versionadded:: 2.2 +**Source code:** :source:`Lib/xmlrpclib.py` + +-------------- + XML-RPC is a Remote Procedure Call method that uses XML passed via HTTP as a transport. With it, a client can call methods with parameters on a remote server (the server is named by a URI) and get back structured data. This module diff --git a/Doc/library/zipfile.rst b/Doc/library/zipfile.rst index 51240ba50a63..30a03614ba53 100644 --- a/Doc/library/zipfile.rst +++ b/Doc/library/zipfile.rst @@ -1,4 +1,3 @@ - :mod:`zipfile` --- Work with ZIP archives ========================================= @@ -9,6 +8,10 @@ .. versionadded:: 1.6 +**Source code:** :source:`Lib/zipfile.py` + +-------------- + The ZIP file format is a common archive and compression standard. This module provides tools to create, read, write, append, and list a ZIP file. Any advanced use of this module will require an understanding of the format, as