summaryrefslogtreecommitdiff
path: root/Doc/library
diff options
context:
space:
mode:
authorAlexandre Vassalotti <alexandre@peadrop.com>2008-05-15 22:09:29 +0000
committerAlexandre Vassalotti <alexandre@peadrop.com>2008-05-15 22:09:29 +0000
commit6461e10158db1f1d41dc9449e233551b2889ebb5 (patch)
treec1860ecebd924e489948471797e0beb81174c29b /Doc/library
parentb645bc7b775b85e3520a561413905a7a1c4ae11c (diff)
downloadcpython-git-6461e10158db1f1d41dc9449e233551b2889ebb5.tar.gz
Merged revisions 62914-62916,62918-62919,62921-62922,62924-62942,62944-62945,62947-62949 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r62914 | skip.montanaro | 2008-05-08 20:45:00 -0400 (Thu, 08 May 2008) | 4 lines Add an example about using NamedTemporaryFile() to replace mktemp(). I'm unclear whether the verbatim text should have been indented or by how much. ........ r62915 | benjamin.peterson | 2008-05-08 20:50:40 -0400 (Thu, 08 May 2008) | 2 lines reindent example ........ r62927 | georg.brandl | 2008-05-09 02:09:25 -0400 (Fri, 09 May 2008) | 2 lines #2788: add .hgignore file. ........ r62928 | georg.brandl | 2008-05-09 02:10:43 -0400 (Fri, 09 May 2008) | 2 lines #2781: fix function name. ........ r62929 | georg.brandl | 2008-05-09 02:18:27 -0400 (Fri, 09 May 2008) | 2 lines Add a sentence to basicConfig() that is in the docstring. ........ r62930 | georg.brandl | 2008-05-09 02:26:54 -0400 (Fri, 09 May 2008) | 2 lines Add another link to colorsys docs. ........ r62931 | georg.brandl | 2008-05-09 02:36:07 -0400 (Fri, 09 May 2008) | 2 lines Add Kodos as a re reference. ........ r62932 | georg.brandl | 2008-05-09 02:39:58 -0400 (Fri, 09 May 2008) | 2 lines Add a note about using reload(). ........ r62933 | andrew.kuchling | 2008-05-09 07:46:05 -0400 (Fri, 09 May 2008) | 3 lines Update planned release date. Uncomment PEP 370 section. Add some module items ........ r62934 | christian.heimes | 2008-05-09 08:19:09 -0400 (Fri, 09 May 2008) | 1 line Add --user option to build_ext ........ r62948 | mark.dickinson | 2008-05-09 13:54:23 -0400 (Fri, 09 May 2008) | 3 lines Issue #2487. math.ldexp(x, n) raised OverflowError when n was large and negative; fix to return an (appropriately signed) zero instead. ........ r62949 | martin.v.loewis | 2008-05-09 14:21:55 -0400 (Fri, 09 May 2008) | 1 line Use the CHM file name that Sphinx assigns. ........
Diffstat (limited to 'Doc/library')
-rw-r--r--Doc/library/_winreg.rst4
-rw-r--r--Doc/library/colorsys.rst9
-rw-r--r--Doc/library/re.rst3
-rw-r--r--Doc/library/tempfile.rst18
4 files changed, 28 insertions, 6 deletions
diff --git a/Doc/library/_winreg.rst b/Doc/library/_winreg.rst
index a4f38790fb..ba2994df87 100644
--- a/Doc/library/_winreg.rst
+++ b/Doc/library/_winreg.rst
@@ -146,7 +146,7 @@ This module offers the following functions:
*key* is an already open key, or one of the predefined :const:`HKEY_\*`
constants.
- It is not necessary to call RegFlushKey to change a key. Registry changes are
+ It is not necessary to call :func:`FlushKey` to change a key. Registry changes are
flushed to disk by the registry using its lazy flusher. Registry changes are
also flushed to disk at system shutdown. Unlike :func:`CloseKey`, the
:func:`FlushKey` method returns only when all the data has been written to the
@@ -159,7 +159,7 @@ This module offers the following functions:
isn't.
-.. function:: RegLoadKey(key, sub_key, file_name)
+.. function:: LoadKey(key, sub_key, file_name)
Creates a subkey under the specified key and stores registration information
from a specified file into that subkey.
diff --git a/Doc/library/colorsys.rst b/Doc/library/colorsys.rst
index 2e7f3b73b1..2cbc704db1 100644
--- a/Doc/library/colorsys.rst
+++ b/Doc/library/colorsys.rst
@@ -1,4 +1,3 @@
-
:mod:`colorsys` --- Conversions between color systems
=====================================================
@@ -15,8 +14,11 @@ spaces are floating point values. In the YIQ space, the Y coordinate is between
0 and 1, but the I and Q coordinates can be positive or negative. In all other
spaces, the coordinates are all between 0 and 1.
-More information about color spaces can be found at
-http://www.poynton.com/ColorFAQ.html.
+.. seealso::
+
+ More information about color spaces can be found at
+ http://www.poynton.com/ColorFAQ.html and
+ http://www.cambridgeincolour.com/tutorials/color-spaces.htm.
The :mod:`colorsys` module defines the following functions:
@@ -57,4 +59,3 @@ Example::
(0.25, 0.5, 0.4)
>>> colorsys.hsv_to_rgb(0.25, 0.5, 0.4)
(0.3, 0.4, 0.2)
-
diff --git a/Doc/library/re.rst b/Doc/library/re.rst
index e3867c0472..707eedfa6a 100644
--- a/Doc/library/re.rst
+++ b/Doc/library/re.rst
@@ -43,6 +43,9 @@ fine-tuning parameters.
second edition of the book no longer covers Python at all, but the first
edition covered writing good regular expression patterns in great detail.
+ `Kodos <http://kodos.sf.net/>`_
+ is a graphical regular expression debugger written in Python.
+
.. _re-syntax:
diff --git a/Doc/library/tempfile.rst b/Doc/library/tempfile.rst
index 7363940d41..25d5acb3db 100644
--- a/Doc/library/tempfile.rst
+++ b/Doc/library/tempfile.rst
@@ -152,6 +152,24 @@ The module defines the following user-callable functions:
Use of this function may introduce a security hole in your program.
By the time you get around to doing anything with the file name it
returns, someone else may have beaten you to the punch.
+ :func:`mktemp` usage can be replaced easily with
+ :func:`NamedTemporaryFile`, passing it the `delete=False` parameter::
+
+ >>> f = NamedTemporaryFile(delete=False)
+ >>> print f.name
+ >>> f.write("Hello World!\n")
+ >>> f.close()
+ >>> os.unlink(f.name)
+ >>> f = NamedTemporaryFile(delete=False)
+ >>> f
+ <open file '<fdopen>', mode 'w+b' at 0x384698>
+ >>> f.name
+ '/var/folders/5q/5qTPn6xq2RaWqk+1Ytw3-U+++TI/-Tmp-/tmpG7V1Y0'
+ >>> f.write("Hello World!\n")
+ >>> f.close()
+ >>> os.unlink(f.name)
+ >>> os.path.exists(f.name)
+ False
The module uses two global variables that tell it how to construct a
temporary name. They are initialized at the first call to any of the