diff options
author | Christian Heimes <christian@cheimes.de> | 2007-12-08 15:33:56 (GMT) |
---|---|---|
committer | Christian Heimes <christian@cheimes.de> | 2007-12-08 15:33:56 (GMT) |
commit | 255f53bdb54a64b93035374ca4484ba0cc1b41e1 (patch) | |
tree | fdbd2aca3415d4f14435e402157e24b96c6de884 /Doc | |
parent | 226679ae095b70eb03505a817912097b8e816fb0 (diff) | |
download | cpython-255f53bdb54a64b93035374ca4484ba0cc1b41e1.zip cpython-255f53bdb54a64b93035374ca4484ba0cc1b41e1.tar.gz cpython-255f53bdb54a64b93035374ca4484ba0cc1b41e1.tar.bz2 |
Merged revisions 59376-59406 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r59377 | georg.brandl | 2007-12-06 01:24:23 +0100 (Thu, 06 Dec 2007) | 2 lines
Add another GHOP student to ACKS.
........
r59378 | raymond.hettinger | 2007-12-06 01:56:53 +0100 (Thu, 06 Dec 2007) | 5 lines
Fix Issue 1045.
Factor-out common calling code by simplifying the length_hint API.
Speed-up the function by caching the PyObject_String for the attribute lookup.
........
r59380 | georg.brandl | 2007-12-06 02:52:24 +0100 (Thu, 06 Dec 2007) | 2 lines
Diverse markup fixes.
........
r59383 | georg.brandl | 2007-12-06 10:45:39 +0100 (Thu, 06 Dec 2007) | 2 lines
Better re.split examples.
........
r59386 | christian.heimes | 2007-12-06 14:15:13 +0100 (Thu, 06 Dec 2007) | 2 lines
Fixed get_config_h_filename for Windows. Without the patch it can't find the pyconfig.h file inside a build tree.
Added several small unit tests for sysconfig.
........
r59387 | christian.heimes | 2007-12-06 14:30:11 +0100 (Thu, 06 Dec 2007) | 1 line
Silence more warnings, _CRT_NONSTDC_NO_DEPRECATE is already defined in pyconfig.h but several projects don't include it.
........
r59389 | christian.heimes | 2007-12-06 14:55:01 +0100 (Thu, 06 Dec 2007) | 1 line
Disabled one test that is failing on Unix
........
r59399 | christian.heimes | 2007-12-06 22:13:06 +0100 (Thu, 06 Dec 2007) | 8 lines
Several Windows related cleanups:
* Removed a #define from pyconfig.h. The macro was already defined a few lines higher.
* Fixed path to tix in the build_tkinter.py script
* Changed make_buildinfo.c to use versions of unlink and strcat which are considered safe by Windows (as suggested by MvL).
* Removed two defines from pyproject.vsprops that are no longer required. Both are defined in pyconfig.h and make_buildinfo.c doesn't use the unsafe versions any more (as suggested by MvL).
* Added some more information about PGO and the property files to PCbuild9/readme.txt.
Are you fine with the changes, Martin?
........
r59400 | raymond.hettinger | 2007-12-07 02:53:01 +0100 (Fri, 07 Dec 2007) | 4 lines
Don't have the docs berate themselves. Keep a professional tone.
If a todo is needed, put it in the tracker.
........
r59402 | georg.brandl | 2007-12-07 10:07:10 +0100 (Fri, 07 Dec 2007) | 3 lines
Increase unit test coverage of SimpleXMLRPCServer.
Written for GHOP by Turkay Eren.
........
r59406 | georg.brandl | 2007-12-07 16:16:57 +0100 (Fri, 07 Dec 2007) | 2 lines
Update to windows doc from Robert.
........
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/ACKS.txt | 1 | ||||
-rw-r--r-- | Doc/c-api/newtypes.rst | 4 | ||||
-rw-r--r-- | Doc/library/bdb.rst | 2 | ||||
-rw-r--r-- | Doc/library/logging.rst | 2 | ||||
-rw-r--r-- | Doc/library/objects.rst | 5 | ||||
-rw-r--r-- | Doc/library/othergui.rst | 2 | ||||
-rw-r--r-- | Doc/library/re.rst | 28 | ||||
-rw-r--r-- | Doc/library/ssl.rst | 3 | ||||
-rw-r--r-- | Doc/library/tarfile.rst | 2 | ||||
-rw-r--r-- | Doc/using/windows.rst | 17 |
10 files changed, 38 insertions, 28 deletions
diff --git a/Doc/ACKS.txt b/Doc/ACKS.txt index 350b1fa..09ac0ab 100644 --- a/Doc/ACKS.txt +++ b/Doc/ACKS.txt @@ -122,6 +122,7 @@ docs@python.org), and we'll be glad to correct the problem. * Vincent Marchetti * Laura Matson * Daniel May +* Rebecca McCreary * Doug Mennella * Paolo Milani * Skip Montanaro diff --git a/Doc/c-api/newtypes.rst b/Doc/c-api/newtypes.rst index 2cf2099..b557957 100644 --- a/Doc/c-api/newtypes.rst +++ b/Doc/c-api/newtypes.rst @@ -1541,13 +1541,13 @@ Sequence Object Structures .. cmember:: binaryfunc PySequenceMethods.sq_concat This function is used by :cfunc:`PySequence_Concat` and has the same - signature. It is also used by the `+` operator, after trying the numeric + signature. It is also used by the ``+`` operator, after trying the numeric addition via the :attr:`tp_as_number.nb_add` slot. .. cmember:: ssizeargfunc PySequenceMethods.sq_repeat This function is used by :cfunc:`PySequence_Repeat` and has the same - signature. It is also used by the `*` operator, after trying numeric + signature. It is also used by the ``*`` operator, after trying numeric multiplication via the :attr:`tp_as_number.nb_mul` slot. .. cmember:: ssizeargfunc PySequenceMethods.sq_item diff --git a/Doc/library/bdb.rst b/Doc/library/bdb.rst index a8a61f1..36f8300 100644 --- a/Doc/library/bdb.rst +++ b/Doc/library/bdb.rst @@ -239,7 +239,7 @@ something went wrong, or ``None`` if all is well. .. method:: Bdb.clear_bpbynumber(arg) Delete the breakpoint which has the index *arg* in the - :attr:`Breakpoint.bpbynumber`. If `arg` is not numeric or out of range, + :attr:`Breakpoint.bpbynumber`. If *arg* is not numeric or out of range, return an error message. .. method:: Bdb.clear_all_file_breaks(filename) diff --git a/Doc/library/logging.rst b/Doc/library/logging.rst index 7805154..537ac3a 100644 --- a/Doc/library/logging.rst +++ b/Doc/library/logging.rst @@ -741,7 +741,7 @@ functions. The proposal which described this feature for inclusion in the Python standard library. - `Original Python :mod:`logging` package <http://www.red-dove.com/python_logging.html>`_ + `Original Python logging package <http://www.red-dove.com/python_logging.html>`_ This is the original source for the :mod:`logging` package. The version of the package available from this site is suitable for use with Python 1.5.2, 2.1.x and 2.2.x, which do not include the :mod:`logging` package in the standard diff --git a/Doc/library/objects.rst b/Doc/library/objects.rst index c6cc9e4..a0e66d1 100644 --- a/Doc/library/objects.rst +++ b/Doc/library/objects.rst @@ -25,8 +25,3 @@ from left to right. (Unary operators group from right to left, but there you have no real choice.) See :ref:`operator-summary` for the complete picture on operator priorities. -.. rubric:: Footnotes - -.. [#] Most descriptions sorely lack explanations of the exceptions that may be raised - --- this will be fixed in a future version of this manual. - diff --git a/Doc/library/othergui.rst b/Doc/library/othergui.rst index aadb74d..91b59e0 100644 --- a/Doc/library/othergui.rst +++ b/Doc/library/othergui.rst @@ -48,7 +48,7 @@ also available for Python: online `tutorial <http://www.pygtk.org/pygtk2tutorial/index.html>`_ is available. - `PyQt <//http://www.riverbankcomputing.co.uk/pyqt/index.php>`_ + `PyQt <http://www.riverbankcomputing.co.uk/pyqt/index.php>`_ PyQt is a :program:`sip`\ -wrapped binding to the Qt toolkit. Qt is an extensive C++ GUI application development framework that is available for Unix, Windows and Mac OS X. :program:`sip` is a tool diff --git a/Doc/library/re.rst b/Doc/library/re.rst index 17da18e..88912eb 100644 --- a/Doc/library/re.rst +++ b/Doc/library/re.rst @@ -1078,16 +1078,21 @@ method is invaluable for converting textual data into data structures that can b easily read and modified by Python as demonstrated in the following example that creates a phonebook. -First, get the input using triple-quoted string syntax:: +First, here is the input. Normally it may come from a file, here we are using +triple-quoted string syntax:: - >>> input = """Ross McFluff 834.345.1254 155 Elm Street - Ronald Heathmore 892.345.3428 436 Finley Avenue - Frank Burger 925.541.7625 662 South Dogwood Way - Heather Albrecht 548.326.4584 919 Park Place""" + >>> input = """Ross McFluff: 834.345.1254 155 Elm Street -Then, convert the string into a list with each line having its own entry:: + Ronald Heathmore: 892.345.3428 436 Finley Avenue + Frank Burger: 925.541.7625 662 South Dogwood Way - >>> entries = re.split("\n", input) + + Heather Albrecht: 548.326.4584 919 Park Place""" + +The entries are separated by one or more newlines. Now we convert the string +into a list with each nonempty line having its own entry:: + + >>> entries = re.split("\n+", input) >>> entries ['Ross McFluff 834.345.1254 155 Elm Street', 'Ronald Heathmore 892.345.3428 436 Finley Avenue', @@ -1098,16 +1103,17 @@ Finally, split each entry into a list with first name, last name, telephone number, and address. We use the ``maxsplit`` paramater of :func:`split` because the address has spaces, our splitting pattern, in it:: - >>> [re.split(" ", entry, 3) for entry in entries] + >>> [re.split(":? ", entry, 3) for entry in entries] [['Ross', 'McFluff', '834.345.1254', '155 Elm Street'], ['Ronald', 'Heathmore', '892.345.3428', '436 Finley Avenue'], ['Frank', 'Burger', '925.541.7625', '662 South Dogwood Way'], ['Heather', 'Albrecht', '548.326.4584', '919 Park Place']] -With a ``maxsplit`` of ``4``, we could seperate the house number from the street -name:: +The ``:?`` pattern matches the colon after the last name, so that it does not +occur in the result list. With a ``maxsplit`` of ``4``, we could seperate the +house number from the street name:: - >>> [re.split(" ", entry, 4) for entry in entries] + >>> [re.split(":? ", entry, 4) for entry in entries] [['Ross', 'McFluff', '834.345.1254', '155', 'Elm Street'], ['Ronald', 'Heathmore', '892.345.3428', '436', 'Finley Avenue'], ['Frank', 'Burger', '925.541.7625', '662', 'South Dogwood Way'], diff --git a/Doc/library/ssl.rst b/Doc/library/ssl.rst index 5675baa..2fd651e 100644 --- a/Doc/library/ssl.rst +++ b/Doc/library/ssl.rst @@ -109,13 +109,14 @@ Functions, Constants, and Exceptions ======================== ========= ========= ========== ========= *client* / **server** **SSLv2** **SSLv3** **SSLv23** **TLSv1** + ------------------------ --------- --------- ---------- --------- *SSLv2* yes no yes* no *SSLv3* yes yes yes no *SSLv23* yes no yes no *TLSv1* no no yes yes ======================== ========= ========= ========== ========= - `*` In some older versions of OpenSSL (for instance, 0.9.7l on OS X 10.4), + In some older versions of OpenSSL (for instance, 0.9.7l on OS X 10.4), an SSLv2 client could not connect to an SSLv23 server. The parameter ``do_handshake_on_connect`` specifies whether to do the SSL diff --git a/Doc/library/tarfile.rst b/Doc/library/tarfile.rst index 7893ccd..5f18155 100644 --- a/Doc/library/tarfile.rst +++ b/Doc/library/tarfile.rst @@ -13,7 +13,7 @@ The :mod:`tarfile` module makes it possible to read and write tar archives, including those using gzip or bz2 compression. -(`.zip` files can be read and written using the :mod:`zipfile` module.) +(:file:`.zip` files can be read and written using the :mod:`zipfile` module.) Some facts and figures: diff --git a/Doc/using/windows.rst b/Doc/using/windows.rst index 9f549fa..9a16938 100644 --- a/Doc/using/windows.rst +++ b/Doc/using/windows.rst @@ -73,6 +73,8 @@ key features: Popular modules (such as PyWin32) with their respective documentation, tool suite for building extensible python applications +Notice that these packages are likely to install *older* versions of Python. + Configuring Python @@ -85,10 +87,11 @@ settings in Windows. Excursus: Setting environment variables --------------------------------------- -Windows has a built-in dialog for changing environment variables: Right-click -the icon for your machine (usually located on your Desktop and called "My -Computer") and choose :menuselection:`Properties` there. Then, open the -:guilabel:`Advanced` tab and click the :guilabel:`Environment Variables` button. +Windows has a built-in dialog for changing environment variables (following +guide applies to XP classical view): Right-click the icon for your machine +(usually located on your Desktop and called "My Computer") and choose +:menuselection:`Properties` there. Then, open the :guilabel:`Advanced` tab +and click the :guilabel:`Environment Variables` button. In short, your path is: @@ -107,7 +110,8 @@ command:: set PYTHONPATH=%PYTHONPATH%;C:\My_python_lib To make this setting permanent, you could add the corresponding command line to -your :file:`autoexec.bat`. +your :file:`autoexec.bat`. :program:`msconfig` is a graphical interface to this +file. Viewing environment variables can also be done more straight-forward: The command prompt will expand strings wrapped into percent signs automatically:: @@ -124,6 +128,9 @@ Consult :command:`set /?` for details on this behaviour. http://support.microsoft.com/kb/310519 How To Manage Environment Variables in Windows XP + http://www.chem.gla.ac.uk/~louis/software/faq/q1.html + Setting Environment variables, Louis J. Farrugia + Finding the Python executable ----------------------------- |