diff options
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/crypt.rst | 3 | ||||
-rw-r--r-- | Doc/library/ctypes.rst | 3 | ||||
-rw-r--r-- | Doc/library/easydialogs.rst | 2 | ||||
-rw-r--r-- | Doc/library/exceptions.rst | 6 | ||||
-rw-r--r-- | Doc/library/fcntl.rst | 2 | ||||
-rw-r--r-- | Doc/library/imputil.rst | 6 | ||||
-rw-r--r-- | Doc/library/os.rst | 3 | ||||
-rw-r--r-- | Doc/library/platform.rst | 2 | ||||
-rw-r--r-- | Doc/library/rexec.rst | 6 | ||||
-rw-r--r-- | Doc/library/rlcompleter.rst | 2 | ||||
-rw-r--r-- | Doc/library/shutil.rst | 2 | ||||
-rw-r--r-- | Doc/library/signal.rst | 2 | ||||
-rw-r--r-- | Doc/library/socket.rst | 3 | ||||
-rw-r--r-- | Doc/library/tkinter.rst | 3 |
14 files changed, 24 insertions, 21 deletions
diff --git a/Doc/library/crypt.rst b/Doc/library/crypt.rst index 2f037c7..91464ef 100644 --- a/Doc/library/crypt.rst +++ b/Doc/library/crypt.rst @@ -52,7 +52,8 @@ A simple example illustrating typical use:: cryptedpasswd = pwd.getpwnam(username)[1] if cryptedpasswd: if cryptedpasswd == 'x' or cryptedpasswd == '*': - raise "Sorry, currently no support for shadow passwords" + raise NotImplementedError( + "Sorry, currently no support for shadow passwords") cleartext = getpass.getpass() return crypt.crypt(cleartext, cryptedpasswd) == cryptedpasswd else: diff --git a/Doc/library/ctypes.rst b/Doc/library/ctypes.rst index 9a1acd6..eca14d6 100644 --- a/Doc/library/ctypes.rst +++ b/Doc/library/ctypes.rst @@ -1210,8 +1210,7 @@ constructs a new Python object each time! Variable-sized data types ^^^^^^^^^^^^^^^^^^^^^^^^^ -``ctypes`` provides some support for variable-sized arrays and structures (this -was added in version 0.9.9.7). +``ctypes`` provides some support for variable-sized arrays and structures. The ``resize`` function can be used to resize the memory buffer of an existing ctypes object. The function takes the object as first argument, and the diff --git a/Doc/library/easydialogs.rst b/Doc/library/easydialogs.rst index f672af6..2cea693 100644 --- a/Doc/library/easydialogs.rst +++ b/Doc/library/easydialogs.rst @@ -100,7 +100,7 @@ The :mod:`EasyDialogs` module defines the following functions: +----------------------+------------------------------------------+ *commandlist* is a list of items of the form *cmdstr* or ``(cmdstr, descr)``, - where *descr* is as above. The *cmdstr*s will appear in a popup menu. When + where *descr* is as above. The *cmdstr*\ s will appear in a popup menu. When chosen, the text of *cmdstr* will be appended to the command line as is, except that a trailing ``':'`` or ``'='`` (if present) will be trimmed off. diff --git a/Doc/library/exceptions.rst b/Doc/library/exceptions.rst index 9116bda..4679e70 100644 --- a/Doc/library/exceptions.rst +++ b/Doc/library/exceptions.rst @@ -84,9 +84,9 @@ The following exceptions are only used as base classes for other exceptions. .. exception:: LookupError - The base class for the exceptions that are raised when a key or index used on a - mapping or sequence is invalid: :exc:`IndexError`, :exc:`KeyError`. This can be - raised directly by :func:`sys.setdefaultencoding`. + The base class for the exceptions that are raised when a key or index used on + a mapping or sequence is invalid: :exc:`IndexError`, :exc:`KeyError`. This + can be raised directly by :func:`codecs.lookup`. .. exception:: EnvironmentError diff --git a/Doc/library/fcntl.rst b/Doc/library/fcntl.rst index b3b977f..fa0b3cb 100644 --- a/Doc/library/fcntl.rst +++ b/Doc/library/fcntl.rst @@ -96,7 +96,7 @@ The module defines the following functions: Perform the lock operation *op* on file descriptor *fd* (file objects providing a :meth:`fileno` method are accepted as well). See the Unix manual - :manpage:`flock(3)` for details. (On some systems, this function is emulated + :manpage:`flock(2)` for details. (On some systems, this function is emulated using :cfunc:`fcntl`.) diff --git a/Doc/library/imputil.rst b/Doc/library/imputil.rst index 09a41f6..86089d2 100644 --- a/Doc/library/imputil.rst +++ b/Doc/library/imputil.rst @@ -160,7 +160,7 @@ This code is intended to be read, not executed. However, it does work parent = None q = import_module(head, qname, parent) if q: return q, tail - raise ImportError, "No module named " + qname + raise ImportError("No module named " + qname) def load_tail(q, tail): m = q @@ -171,7 +171,7 @@ This code is intended to be read, not executed. However, it does work mname = "%s.%s" % (m.__name__, head) m = import_module(head, mname, m) if not m: - raise ImportError, "No module named " + mname + raise ImportError("No module named " + mname) return m def ensure_fromlist(m, fromlist, recursive=0): @@ -189,7 +189,7 @@ This code is intended to be read, not executed. However, it does work subname = "%s.%s" % (m.__name__, sub) submod = import_module(sub, subname, m) if not submod: - raise ImportError, "No module named " + subname + raise ImportError("No module named " + subname) def import_module(partname, fqname, parent): try: diff --git a/Doc/library/os.rst b/Doc/library/os.rst index fa179df..24c2191 100644 --- a/Doc/library/os.rst +++ b/Doc/library/os.rst @@ -528,6 +528,9 @@ by file descriptors. Force write of file with filedescriptor *fd* to disk. Does not force update of metadata. Availability: Unix. + .. note:: + This function is not available on MacOS. + .. function:: fpathconf(fd, name) diff --git a/Doc/library/platform.rst b/Doc/library/platform.rst index cd90c38..9900278 100644 --- a/Doc/library/platform.rst +++ b/Doc/library/platform.rst @@ -169,7 +169,7 @@ Java Platform .. function:: java_ver(release='', vendor='', vminfo=('','',''), osinfo=('','','')) - Version interface for JPython. + Version interface for Jython. Returns a tuple ``(release, vendor, vminfo, osinfo)`` with *vminfo* being a tuple ``(vm_name, vm_release, vm_vendor)`` and *osinfo* being a tuple diff --git a/Doc/library/rexec.rst b/Doc/library/rexec.rst index 7736904..2ce612a 100644 --- a/Doc/library/rexec.rst +++ b/Doc/library/rexec.rst @@ -272,11 +272,11 @@ Let us say that we want a slightly more relaxed policy than the standard elif mode in ('w', 'wb', 'a', 'ab'): # check filename : must begin with /tmp/ if file[:5]!='/tmp/': - raise IOError, "can't write outside /tmp" + raise IOError("can't write outside /tmp") elif (string.find(file, '/../') >= 0 or file[:3] == '../' or file[-3:] == '/..'): - raise IOError, "'..' in filename forbidden" - else: raise IOError, "Illegal open() mode" + raise IOError("'..' in filename forbidden") + else: raise IOError("Illegal open() mode") return open(file, mode, buf) Notice that the above code will occasionally forbid a perfectly valid filename; diff --git a/Doc/library/rlcompleter.rst b/Doc/library/rlcompleter.rst index 50f1afd..85a9d79 100644 --- a/Doc/library/rlcompleter.rst +++ b/Doc/library/rlcompleter.rst @@ -52,7 +52,7 @@ Completer objects have the following method: .. method:: Completer.complete(text, state) - Return the *state*th completion for *text*. + Return the *state*\ th completion for *text*. If called for *text* that doesn't include a period character (``'.'``), it will complete from names currently defined in :mod:`__main__`, :mod:`__builtin__` and diff --git a/Doc/library/shutil.rst b/Doc/library/shutil.rst index e09b646..ad3ab57 100644 --- a/Doc/library/shutil.rst +++ b/Doc/library/shutil.rst @@ -216,7 +216,7 @@ provided by this module. :: except OSError, why: errors.extend((src, dst, str(why))) if errors: - raise Error, errors + raise Error(errors) Another example that uses the :func:`ignore_patterns` helper:: diff --git a/Doc/library/signal.rst b/Doc/library/signal.rst index 3793a89..c039eee 100644 --- a/Doc/library/signal.rst +++ b/Doc/library/signal.rst @@ -232,7 +232,7 @@ be sent, and the handler raises an exception. :: def handler(signum, frame): print 'Signal handler called with signal', signum - raise IOError, "Couldn't open device!" + raise IOError("Couldn't open device!") # Set the signal handler and a 5-second alarm signal.signal(signal.SIGALRM, handler) diff --git a/Doc/library/socket.rst b/Doc/library/socket.rst index d1b107e..97fe268 100644 --- a/Doc/library/socket.rst +++ b/Doc/library/socket.rst @@ -401,6 +401,9 @@ The module :mod:`socket` exports the following constants and functions: library and needs objects of type :ctype:`struct in_addr`, which is the C type for the 32-bit packed binary this function returns. + :func:`inet_aton` also accepts strings with less than three dots; see the + Unix manual page :manpage:`inet(3)` for details. + If the IPv4 address string passed to this function is invalid, :exc:`socket.error` will be raised. Note that exactly what is valid depends on the underlying C implementation of :cfunc:`inet_aton`. diff --git a/Doc/library/tkinter.rst b/Doc/library/tkinter.rst index ce8085d..b1a1791 100644 --- a/Doc/library/tkinter.rst +++ b/Doc/library/tkinter.rst @@ -29,9 +29,6 @@ is maintained at ActiveState.) `Tkinter reference: a GUI for Python <http://infohost.nmt.edu/tcc/help/pubs/lang.html>`_ On-line reference material. - `Tkinter for JPython <http://jtkinter.sourceforge.net>`_ - The Jython interface to Tkinter. - `Python and Tkinter Programming <http://www.amazon.com/exec/obidos/ASIN/1884777813>`_ The book by John Grayson (ISBN 1-884777-81-3). |