summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
Diffstat (limited to 'Doc')
-rw-r--r--Doc/conf.py3
-rw-r--r--Doc/distutils/builtdist.rst16
-rw-r--r--Doc/library/cgi.rst2
-rw-r--r--Doc/library/constants.rst2
-rw-r--r--Doc/library/ftplib.rst3
-rw-r--r--Doc/library/logging.rst1
-rw-r--r--Doc/library/multiprocessing.rst5
-rw-r--r--Doc/library/stdtypes.rst2
-rw-r--r--Doc/library/warnings.rst36
-rw-r--r--Doc/tutorial/introduction.rst28
10 files changed, 61 insertions, 37 deletions
diff --git a/Doc/conf.py b/Doc/conf.py
index 352c15f..3f187a2 100644
--- a/Doc/conf.py
+++ b/Doc/conf.py
@@ -151,6 +151,9 @@ latex_preamble = r'''
# Documents to append as an appendix to all manuals.
latex_appendices = ['glossary', 'about', 'license', 'copyright']
+# Get LaTeX to handle Unicode correctly
+latex_elements = {'inputenc': r'\usepackage[utf8x]{inputenc}'}
+
# Options for the coverage checker
# --------------------------------
diff --git a/Doc/distutils/builtdist.rst b/Doc/distutils/builtdist.rst
index 6e7e51c..e58937d 100644
--- a/Doc/distutils/builtdist.rst
+++ b/Doc/distutils/builtdist.rst
@@ -429,13 +429,6 @@ built-in functions in the installation script.
also the configuration. For details refer to Microsoft's documentation of the
:cfunc:`SHGetSpecialFolderPath` function.
-Vista User Access Control (UAC)
-===============================
-
-Starting with Python 2.6, bdist_wininst supports a :option:`--user-access-control`
-option. The default is 'none' (meaning no UAC handling is done), and other
-valid values are 'auto' (meaning prompt for UAC elevation if Python was
-installed for all users) and 'force' (meaning always prompt for elevation)
.. function:: create_shortcut(target, description, filename[, arguments[, workdir[, iconpath[, iconindex]]]])
@@ -447,3 +440,12 @@ installed for all users) and 'force' (meaning always prompt for elevation)
and *iconindex* is the index of the icon in the file *iconpath*. Again, for
details consult the Microsoft documentation for the :class:`IShellLink`
interface.
+
+
+Vista User Access Control (UAC)
+===============================
+
+Starting with Python 2.6, bdist_wininst supports a :option:`--user-access-control`
+option. The default is 'none' (meaning no UAC handling is done), and other
+valid values are 'auto' (meaning prompt for UAC elevation if Python was
+installed for all users) and 'force' (meaning always prompt for elevation).
diff --git a/Doc/library/cgi.rst b/Doc/library/cgi.rst
index 03dfe2d..17482d7 100644
--- a/Doc/library/cgi.rst
+++ b/Doc/library/cgi.rst
@@ -208,7 +208,7 @@ The problem with the code is that you should never expect that a client will
provide valid input to your scripts. For example, if a curious user appends
another ``user=foo`` pair to the query string, then the script would crash,
because in this situation the ``getvalue("user")`` method call returns a list
-instead of a string. Calling the :meth:`toupper` method on a list is not valid
+instead of a string. Calling the :meth:`~str.upper` method on a list is not valid
(since lists do not have a method of this name) and results in an
:exc:`AttributeError` exception.
diff --git a/Doc/library/constants.rst b/Doc/library/constants.rst
index b9b3671..f734b5c 100644
--- a/Doc/library/constants.rst
+++ b/Doc/library/constants.rst
@@ -66,7 +66,7 @@ should not be used in programs.
Objects that when printed, print a message like "Use quit() or Ctrl-D
(i.e. EOF) to exit", and when called, raise :exc:`SystemExit` with the
- specified exit code, and when .
+ specified exit code.
.. data:: copyright
license
diff --git a/Doc/library/ftplib.rst b/Doc/library/ftplib.rst
index ed601a0..bd35728 100644
--- a/Doc/library/ftplib.rst
+++ b/Doc/library/ftplib.rst
@@ -140,7 +140,8 @@ followed by ``lines`` for the text version or ``binary`` for the binary version.
``'anonymous@'``. This function should be called only once for each instance,
after a connection has been established; it should not be called at all if a
host and user were given when the instance was created. Most FTP commands are
- only allowed after the client has logged in.
+ only allowed after the client has logged in. The *acct* parameter supplies
+ "accounting information"; few systems implement this.
.. method:: FTP.abort()
diff --git a/Doc/library/logging.rst b/Doc/library/logging.rst
index 7f513c4..fa5f037 100644
--- a/Doc/library/logging.rst
+++ b/Doc/library/logging.rst
@@ -1362,6 +1362,7 @@ Note that at present, the :mod:`multiprocessing` module does not provide
working lock functionality on all platforms (see
http://bugs.python.org/issue3770).
+
.. _network-logging:
Sending and receiving logging events across a network
diff --git a/Doc/library/multiprocessing.rst b/Doc/library/multiprocessing.rst
index 5cd70d9..1898132 100644
--- a/Doc/library/multiprocessing.rst
+++ b/Doc/library/multiprocessing.rst
@@ -1151,11 +1151,6 @@ their parent process exits. The manager classes are defined in the
Run the server in the current process.
- .. method:: from_address(address, authkey)
-
- A class method which creates a manager object referring to a pre-existing
- server process which is using the given address and authentication key.
-
.. method:: get_server()
Returns a :class:`Server` object which represents the actual server under
diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst
index f739f46..c9e7287 100644
--- a/Doc/library/stdtypes.rst
+++ b/Doc/library/stdtypes.rst
@@ -1938,7 +1938,7 @@ pairs within braces, for example: ``{'jack': 4098, 'sjoerd': 4127}`` or ``{4098:
:meth:`update` accepts either another dictionary object or an iterable of
key/value pairs (as a tuple or other iterable of length two). If keyword
- arguments are specified, the dictionary is then is updated with those
+ arguments are specified, the dictionary is then updated with those
key/value pairs: ``d.update(red=1, blue=2)``.
.. method:: values()
diff --git a/Doc/library/warnings.rst b/Doc/library/warnings.rst
index 1574e27..260323e 100644
--- a/Doc/library/warnings.rst
+++ b/Doc/library/warnings.rst
@@ -1,4 +1,3 @@
-
:mod:`warnings` --- Warning control
===================================
@@ -131,16 +130,16 @@ the disposition of the match. Each entry is a tuple of the form (*action*,
+---------------+----------------------------------------------+
* *message* is a string containing a regular expression that the warning message
- must match (the match is compiled to always be case-insensitive)
+ must match (the match is compiled to always be case-insensitive).
* *category* is a class (a subclass of :exc:`Warning`) of which the warning
- category must be a subclass in order to match
+ category must be a subclass in order to match.
* *module* is a string containing a regular expression that the module name must
- match (the match is compiled to be case-sensitive)
+ match (the match is compiled to be case-sensitive).
* *lineno* is an integer that the line number where the warning occurred must
- match, or ``0`` to match all line numbers
+ match, or ``0`` to match all line numbers.
Since the :exc:`Warning` class is derived from the built-in :exc:`Exception`
class, to turn a warning into an error we simply raise ``category(message)``.
@@ -285,18 +284,20 @@ Available Functions
.. function:: formatwarning(message, category, filename, lineno[, line])
- Format a warning the standard way. This returns a string which may contain
- embedded newlines and ends in a newline. *line* is
- a line of source code to be included in the warning message; if *line* is not supplied,
- :func:`formatwarning` will try to read the line specified by *filename* and *lineno*.
+ Format a warning the standard way. This returns a string which may contain
+ embedded newlines and ends in a newline. *line* is a line of source code to
+ be included in the warning message; if *line* is not supplied,
+ :func:`formatwarning` will try to read the line specified by *filename* and
+ *lineno*.
.. function:: filterwarnings(action[, message[, category[, module[, lineno[, append]]]]])
- Insert an entry into the list of warnings filters. The entry is inserted at the
- front by default; if *append* is true, it is inserted at the end. This checks
- the types of the arguments, compiles the message and module regular expressions,
- and inserts them as a tuple in the list of warnings filters. Entries closer to
+ Insert an entry into the list of :ref:`warnings filter specifications
+ <warning-filter>`. The entry is inserted at the front by default; if
+ *append* is true, it is inserted at the end. This checks the types of the
+ arguments, compiles the *message* and *module* regular expressions, and
+ inserts them as a tuple in the list of warnings filters. Entries closer to
the front of the list override entries later in the list, if both match a
particular warning. Omitted arguments default to a value that matches
everything.
@@ -304,10 +305,11 @@ Available Functions
.. function:: simplefilter(action[, category[, lineno[, append]]])
- Insert a simple entry into the list of warnings filters. The meaning of the
- function parameters is as for :func:`filterwarnings`, but regular expressions
- are not needed as the filter inserted always matches any message in any module
- as long as the category and line number match.
+ Insert a simple entry into the list of :ref:`warnings filter specifications
+ <warning-filter>`. The meaning of the function parameters is as for
+ :func:`filterwarnings`, but regular expressions are not needed as the filter
+ inserted always matches any message in any module as long as the category and
+ line number match.
.. function:: resetwarnings()
diff --git a/Doc/tutorial/introduction.rst b/Doc/tutorial/introduction.rst
index b279f71..8db19da 100644
--- a/Doc/tutorial/introduction.rst
+++ b/Doc/tutorial/introduction.rst
@@ -150,7 +150,6 @@ convert a complex number to a real number. Use ``abs(z)`` to get its magnitude
4.0
>>> abs(a) # sqrt(a.real**2 + a.imag**2)
5.0
- >>>
In interactive mode, the last printed expression is assigned to the variable
``_``. This means that when you are using Python as a desk calculator, it is
@@ -164,7 +163,6 @@ somewhat easier to continue calculations, for example::
113.0625
>>> round(_, 2)
113.06
- >>>
This variable should be treated as read-only by the user. Don't explicitly
assign a value to it --- you would create an independent local variable with the
@@ -212,12 +210,32 @@ next line is a logical continuation of the line::
Note that newlines still need to be embedded in the string using ``\n``; the
newline following the trailing backslash is discarded. This example would print
-the following::
+the following:
+
+.. code-block:: text
This is a rather long string containing
several lines of text just as you would do in C.
Note that whitespace at the beginning of the line is significant.
+Or, strings can be surrounded in a pair of matching triple-quotes: ``"""`` or
+``'''``. End of lines do not need to be escaped when using triple-quotes, but
+they will be included in the string. ::
+
+ print """
+ Usage: thingy [OPTIONS]
+ -h Display this usage message
+ -H hostname Hostname to connect to
+ """
+
+produces the following output:
+
+.. code-block:: text
+
+ Usage: thingy [OPTIONS]
+ -h Display this usage message
+ -H hostname Hostname to connect to
+
If we make the string literal a "raw" string, ``\n`` sequences are not converted
to newlines, but the backslash at the end of the line, and the newline character
in the source, are both included in the string as data. Thus, the example::
@@ -227,7 +245,9 @@ in the source, are both included in the string as data. Thus, the example::
print(hello)
-would print::
+would print:
+
+.. code-block:: text
This is a rather long string containing\n\
several lines of text much as you would do in C.