.. XXX check if wiki page is still up to date
A summary of available frameworks is maintained by Paul Boddie at
-http://wiki.python.org/moin/WebProgramming .
+http://wiki.python.org/moin/WebProgramming\ .
Cameron Laird maintains a useful set of pages about Python web technologies at
http://phaseit.net/claird/comp.lang.python/web_python.
return self.val
def __set__(self, obj, val):
- print 'Updating' , self.name
+ print 'Updating', self.name
self.val = val
>>> class MyClass(object):
To get a complete idea of what issues you will need to deal with, see the
`What's New in Python 3.0`_. Others have reorganized the data in other formats
-such as http://docs.pythonsprints.com/python3_porting/py-porting.html .
+such as http://docs.pythonsprints.com/python3_porting/py-porting.html\ .
The following are some steps to take to try to support both Python 2 & 3 from
the same source code.
to your HTTP request.
Some websites [#]_ dislike being browsed by programs, or send different versions
-to different browsers [#]_ . By default urllib2 identifies itself as
+to different browsers [#]_. By default urllib2 identifies itself as
``Python-urllib/x.y`` (where ``x`` and ``y`` are the major and minor version
numbers of the Python release,
e.g. ``Python-urllib/2.5``), which may confuse the site, or just plain
The :mod:`bdb` module also defines two classes:
-.. class:: Breakpoint(self, file, line, temporary=0, cond=None , funcname=None)
+.. class:: Breakpoint(self, file, line, temporary=0, cond=None, funcname=None)
This class implements temporary breakpoints, ignore counts, disabling and
(re-)enabling, and conditionals.
Open the hash format file named *filename*. Files never intended to be
preserved on disk may be created by passing ``None`` as the *filename*. The
optional *flag* identifies the mode used to open the file. It may be ``'r'``
- (read only), ``'w'`` (read-write) , ``'c'`` (read-write - create if necessary;
+ (read only), ``'w'`` (read-write), ``'c'`` (read-write - create if necessary;
the default) or ``'n'`` (read-write - truncate to zero length). The other
arguments are rarely used and are just passed to the low-level :c:func:`dbopen`
function. Consult the Berkeley DB documentation for their use and
-----------------------------------------------------------
The following :class:`CookieJar` subclasses are provided for reading and
-writing .
+writing.
.. class:: MozillaCookieJar(filename, delayload=None, policy=None)
WINUSERAPI int WINAPI
MessageBoxA(
- HWND hWnd ,
+ HWND hWnd,
LPCSTR lpText,
LPCSTR lpCaption,
UINT uType);
:func:`islice` seq, [start,] stop [, step] elements from seq[start:stop:step] ``islice('ABCDEFG', 2, None) --> C D E F G``
:func:`imap` func, p, q, ... func(p0, q0), func(p1, q1), ... ``imap(pow, (2,3,10), (5,2,3)) --> 32 9 1000``
:func:`starmap` func, seq func(\*seq[0]), func(\*seq[1]), ... ``starmap(pow, [(2,5), (3,2), (10,3)]) --> 32 9 1000``
-:func:`tee` it, n it1, it2 , ... itn splits one iterator into n
+:func:`tee` it, n it1, it2, ... itn splits one iterator into n
:func:`takewhile` pred, seq seq[0], seq[1], until pred fails ``takewhile(lambda x: x<5, [1,4,6,4,1]) --> 1 4``
:func:`izip` p, q, ... (p[0], q[0]), (p[1], q[1]), ... ``izip('ABCD', 'xy') --> Ax By``
:func:`izip_longest` p, q, ... (p[0], q[0]), (p[1], q[1]), ... ``izip_longest('ABCD', 'xy', fillvalue='-') --> Ax By C- D-``
---------------------
:class:`LoggerAdapter` instances are used to conveniently pass contextual
-information into logging calls. For a usage example , see the section on
+information into logging calls. For a usage example, see the section on
:ref:`adding contextual information to your logging output <context-info>`.
.. versionadded:: 2.6
the official documentation for the OSS C API
The module defines a large number of constants supplied by the OSS device
- driver; see ``<sys/soundcard.h>`` on either Linux or FreeBSD for a listing .
+ driver; see ``<sys/soundcard.h>`` on either Linux or FreeBSD for a listing.
:mod:`ossaudiodev` defines the following variables and functions:
.. [#] The encoding string included in XML output should conform to the
appropriate standards. For example, "UTF-8" is valid, but "UTF8" is
not. See http://www.w3.org/TR/2006/REC-xml11-20060816/#NT-EncodingDecl
- and http://www.iana.org/assignments/character-sets .
+ and http://www.iana.org/assignments/character-sets\ .
.. rubric:: Citations
-.. [C99] ISO/IEC 9899:1999. "Programming languages -- C." A public draft of this standard is available at http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf .
+.. [C99] ISO/IEC 9899:1999. "Programming languages -- C." A public draft of this standard is available at http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf\ .
The Tk/Tcl development is largely taking place at ActiveState.
`Tcl and the Tk Toolkit <http://www.amazon.com/exec/obidos/ASIN/020163337X>`_
- The book by John Ousterhout, the inventor of Tcl .
+ The book by John Ousterhout, the inventor of Tcl.
`Practical Programming in Tcl and Tk <http://www.amazon.com/exec/obidos/ASIN/0130220280>`_
Brent Welch's encyclopedic book.
preceded with an ``@``, as in ``"@/usr/contrib/bitmap/gumby.bit"``.
boolean
- You can pass integers 0 or 1 or the strings ``"yes"`` or ``"no"`` .
+ You can pass integers 0 or 1 or the strings ``"yes"`` or ``"no"``.
callback
This is any Python function that takes no arguments. For example::
At least one of the following options must be specified when invoking
:mod:`trace`. The :option:`--listfuncs <-l>` option is mutually exclusive with
-the :option:`--trace <-t>` and :option:`--counts <-c>` options . When
+the :option:`--trace <-t>` and :option:`--counts <-c>` options. When
:option:`--listfuncs <-l>` is provided, neither :option:`--counts <-c>` nor
:option:`--trace <-t>` are accepted, and vice versa.
.. [#] The encoding string included in XML output should conform to the
appropriate standards. For example, "UTF-8" is valid, but "UTF8" is
not. See http://www.w3.org/TR/2006/REC-xml11-20060816/#NT-EncodingDecl
- and http://www.iana.org/assignments/character-sets .
+ and http://www.iana.org/assignments/character-sets\ .