mirror of https://github.com/python/cpython.git
merge with 3.4
This commit is contained in:
commit
794e9bf1fe
|
@ -68,7 +68,7 @@ taken on the bug.
|
|||
Article which goes into some detail about how to create a useful bug report.
|
||||
This describes what kind of information is useful and why it is useful.
|
||||
|
||||
`Bug Writing Guidelines <http://developer.mozilla.org/en/docs/Bug_writing_guidelines>`_
|
||||
`Bug Writing Guidelines <https://developer.mozilla.org/en-US/docs/Mozilla/QA/Bug_writing_guidelines>`_
|
||||
Information about writing a good bug report. Some of this is specific to the
|
||||
Mozilla project, but describes general good practices.
|
||||
|
||||
|
|
|
@ -244,4 +244,4 @@ without warnings does not guarantee that PyPI will convert the content
|
|||
successfully.
|
||||
|
||||
|
||||
.. _Python Package Index (PyPI): https://pypi.python.org/
|
||||
.. _Python Package Index (PyPI): https://pypi.python.org/pypi
|
||||
|
|
|
@ -368,9 +368,9 @@ Can Python be compiled to machine code, C or some other language?
|
|||
|
||||
Practical answer:
|
||||
|
||||
`Cython <http://cython.org/>`_ and `Pyrex <http://www.cosc.canterbury.ac.nz/~greg/python/Pyrex/>`_
|
||||
`Cython <http://cython.org/>`_ and `Pyrex <http://www.cosc.canterbury.ac.nz/greg.ewing/python/Pyrex/>`_
|
||||
compile a modified version of Python with optional annotations into C
|
||||
extensions. `Weave <http://www.scipy.org/Weave>`_ makes it easy to
|
||||
extensions. `Weave <http://docs.scipy.org/doc/scipy-dev/reference/tutorial/weave.html>`_ makes it easy to
|
||||
intermingle Python and C code in various ways to increase performance.
|
||||
`Nuitka <http://www.nuitka.net/>`_ is an up-and-coming compiler of Python
|
||||
into C++ code, aiming to support the full Python language.
|
||||
|
@ -392,7 +392,7 @@ approach is feasible, although the speedups reached so far are only modest
|
|||
Hugunin has demonstrated that in combination with whole-program analysis,
|
||||
speedups of 1000x are feasible for small demo programs. See the proceedings
|
||||
from the `1997 Python conference
|
||||
<https://www.python.org/workshops/1997-10/proceedings/>`_ for more information.)
|
||||
<http://legacy.python.org/workshops/1997-10/proceedings/>`_ for more information.)
|
||||
|
||||
|
||||
How does Python manage memory?
|
||||
|
|
|
@ -42,7 +42,7 @@ on what you're trying to do.
|
|||
.. XXX make sure these all work
|
||||
|
||||
`Cython <http://cython.org>`_ and its relative `Pyrex
|
||||
<http://www.cosc.canterbury.ac.nz/~greg/python/Pyrex/>`_ are compilers
|
||||
<http://www.cosc.canterbury.ac.nz/greg.ewing/python/Pyrex/>`_ are compilers
|
||||
that accept a slightly modified form of Python and generate the corresponding
|
||||
C code. Cython and Pyrex make it possible to write an extension without having
|
||||
to learn Python's C API.
|
||||
|
@ -53,8 +53,8 @@ with a tool such as `SWIG <http://www.swig.org>`_. `SIP
|
|||
<http://www.riverbankcomputing.co.uk/software/sip/>`__, `CXX
|
||||
<http://cxx.sourceforge.net/>`_ `Boost
|
||||
<http://www.boost.org/libs/python/doc/index.html>`_, or `Weave
|
||||
<http://www.scipy.org/Weave>`_ are also alternatives for wrapping
|
||||
C++ libraries.
|
||||
<http://docs.scipy.org/doc/scipy-dev/reference/tutorial/weave.html>`_ are also
|
||||
alternatives for wrapping C++ libraries.
|
||||
|
||||
|
||||
How can I execute arbitrary Python statements from C?
|
||||
|
|
|
@ -223,8 +223,8 @@ releases are announced on the comp.lang.python and comp.lang.python.announce
|
|||
newsgroups and on the Python home page at https://www.python.org/; an RSS feed of
|
||||
news is available.
|
||||
|
||||
You can also access the development version of Python through Subversion. See
|
||||
https://docs.python.org/devguide/faq for details.
|
||||
You can also access the development version of Python through Mercurial. See
|
||||
https://docs.python.org/devguide/faq.html for details.
|
||||
|
||||
|
||||
How do I submit bug reports and patches for Python?
|
||||
|
@ -284,7 +284,7 @@ Why is it called Python?
|
|||
|
||||
When he began implementing Python, Guido van Rossum was also reading the
|
||||
published scripts from `"Monty Python's Flying Circus"
|
||||
<http://pythonline.com/>`__, a BBC comedy series from the 1970s. Van Rossum
|
||||
<http://en.wikipedia.org/wiki/Monty_Python>`__, a BBC comedy series from the 1970s. Van Rossum
|
||||
thought he needed a name that was short, unique, and slightly mysterious, so he
|
||||
decided to call the language Python.
|
||||
|
||||
|
@ -313,7 +313,7 @@ guaranteed that interfaces will remain the same throughout a series of bugfix
|
|||
releases.
|
||||
|
||||
The latest stable releases can always be found on the `Python download page
|
||||
<https://python.org/download/>`_. There are two recommended production-ready
|
||||
<https://www.python.org/download/>`_. There are two recommended production-ready
|
||||
versions at this point in time, because at the moment there are two branches of
|
||||
stable releases: 2.x and 3.x. Python 3.x may be less useful than 2.x, since
|
||||
currently there is more third party software available for Python 2 than for
|
||||
|
@ -337,9 +337,9 @@ the group or even read it.
|
|||
Have any significant projects been done in Python?
|
||||
--------------------------------------------------
|
||||
|
||||
See https://python.org/about/success for a list of projects that use Python.
|
||||
See https://www.python.org/about/success for a list of projects that use Python.
|
||||
Consulting the proceedings for `past Python conferences
|
||||
<https://python.org/community/workshops/>`_ will reveal contributions from many
|
||||
<https://www.python.org/community/workshops/>`_ will reveal contributions from many
|
||||
different companies and organizations.
|
||||
|
||||
High-profile Python projects include `the Mailman mailing list manager
|
||||
|
|
|
@ -59,13 +59,13 @@ Qt
|
|||
|
||||
There are bindings available for the Qt toolkit (using either `PyQt
|
||||
<http://www.riverbankcomputing.co.uk/software/pyqt/>`_ or `PySide
|
||||
<http://www.pyside.org/>`_) and for KDE (`PyKDE <http://www.riverbankcomputing.co.uk/software/pykde/intro>`__).
|
||||
<http://www.pyside.org/>`_) and for KDE (`PyKDE <https://techbase.kde.org/Development/Languages/Python>`__).
|
||||
PyQt is currently more mature than PySide, but you must buy a PyQt license from
|
||||
`Riverbank Computing <http://www.riverbankcomputing.co.uk/software/pyqt/license>`_
|
||||
if you want to write proprietary applications. PySide is free for all applications.
|
||||
|
||||
Qt 4.5 upwards is licensed under the LGPL license; also, commercial licenses
|
||||
are available from `Nokia <http://qt.nokia.com/>`_.
|
||||
are available from `The Qt Company <http://www.qt.io/licensing/>`_.
|
||||
|
||||
Gtk+
|
||||
----
|
||||
|
@ -103,7 +103,7 @@ What platform-specific GUI toolkits exist for Python?
|
|||
========================================================
|
||||
|
||||
By installing the `PyObjc Objective-C bridge
|
||||
<http://pyobjc.sourceforge.net>`_, Python programs can use Mac OS X's
|
||||
<https://pythonhosted.org/pyobjc/>`_, Python programs can use Mac OS X's
|
||||
Cocoa libraries.
|
||||
|
||||
:ref:`Pythonwin <windows-faq>` by Mark Hammond includes an interface to the
|
||||
|
|
|
@ -182,7 +182,7 @@ How do I create documentation from doc strings?
|
|||
The :mod:`pydoc` module can create HTML from the doc strings in your Python
|
||||
source code. An alternative for creating API documentation purely from
|
||||
docstrings is `epydoc <http://epydoc.sf.net/>`_. `Sphinx
|
||||
<http://sphinx.pocoo.org>`_ can also include docstring content.
|
||||
<http://sphinx-doc.org>`_ can also include docstring content.
|
||||
|
||||
|
||||
How do I get a single keypress at a time?
|
||||
|
|
|
@ -30,7 +30,7 @@ Pythonwin debugger colors breakpoints and has quite a few cool features such as
|
|||
debugging non-Pythonwin programs. Pythonwin is available as part of the `Python
|
||||
for Windows Extensions <http://sourceforge.net/projects/pywin32/>`__ project and
|
||||
as a part of the ActivePython distribution (see
|
||||
http://www.activestate.com/Products/ActivePython/index.html).
|
||||
http://www.activestate.com/activepython\ ).
|
||||
|
||||
`Boa Constructor <http://boa-constructor.sourceforge.net/>`_ is an IDE and GUI
|
||||
builder that uses wxWidgets. It offers visual frame creation and manipulation,
|
||||
|
@ -38,7 +38,7 @@ an object inspector, many views on the source like object browsers, inheritance
|
|||
hierarchies, doc string generated html documentation, an advanced debugger,
|
||||
integrated help, and Zope support.
|
||||
|
||||
`Eric <http://www.die-offenbachs.de/eric/index.html>`_ is an IDE built on PyQt
|
||||
`Eric <http://eric-ide.python-projects.org/>`_ is an IDE built on PyQt
|
||||
and the Scintilla editing component.
|
||||
|
||||
Pydb is a version of the standard Python debugger pdb, modified for use with DDD
|
||||
|
@ -50,7 +50,7 @@ There are a number of commercial Python IDEs that include graphical debuggers.
|
|||
They include:
|
||||
|
||||
* Wing IDE (http://wingware.com/)
|
||||
* Komodo IDE (http://www.activestate.com/Products/Komodo)
|
||||
* Komodo IDE (http://komodoide.com/)
|
||||
* PyCharm (https://www.jetbrains.com/pycharm/)
|
||||
|
||||
|
||||
|
@ -69,8 +69,7 @@ plug-ins to add a custom feature. In addition to the bug checking that
|
|||
PyChecker performs, Pylint offers some additional features such as checking line
|
||||
length, whether variable names are well-formed according to your coding
|
||||
standard, whether declared interfaces are fully implemented, and more.
|
||||
http://www.logilab.org/card/pylint_manual provides a full list of Pylint's
|
||||
features.
|
||||
http://docs.pylint.org/ provides a full list of Pylint's features.
|
||||
|
||||
|
||||
How can I create a stand-alone binary from a Python script?
|
||||
|
@ -101,13 +100,7 @@ which don't. One is Thomas Heller's py2exe (Windows only) at
|
|||
|
||||
http://www.py2exe.org/
|
||||
|
||||
Another is Christian Tismer's `SQFREEZE <http://starship.python.net/crew/pirx>`_
|
||||
which appends the byte code to a specially-prepared Python interpreter that can
|
||||
find the byte code in the executable.
|
||||
|
||||
Other tools include Fredrik Lundh's `Squeeze
|
||||
<http://www.pythonware.com/products/python/squeeze>`_ and Anthony Tuininga's
|
||||
`cx_Freeze <http://starship.python.net/crew/atuining/cx_Freeze/index.html>`_.
|
||||
Another tool is Anthony Tuininga's `cx_Freeze <http://cx-freeze.sourceforge.net/>`_.
|
||||
|
||||
|
||||
Are there coding standards or a style guide for Python programs?
|
||||
|
@ -1125,7 +1118,7 @@ How do you remove duplicates from a list?
|
|||
|
||||
See the Python Cookbook for a long discussion of many ways to do this:
|
||||
|
||||
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/52560
|
||||
http://code.activestate.com/recipes/52560/
|
||||
|
||||
If you don't mind reordering the list, sort it and then scan from the end of the
|
||||
list, deleting duplicates as you go::
|
||||
|
|
|
@ -31,7 +31,7 @@ obvious; otherwise, you might need a little more guidance.
|
|||
|
||||
.. |Python Development on XP| image:: python-video-icon.png
|
||||
.. _`Python Development on XP`:
|
||||
http://www.showmedo.com/videos/series?name=pythonOzsvaldPyNewbieSeries
|
||||
http://showmedo.com/videotutorials/series?name=pythonOzsvaldPyNewbieSeries
|
||||
|
||||
Unless you use some sort of integrated development environment, you will end up
|
||||
*typing* Windows commands into what is variously referred to as a "DOS window"
|
||||
|
@ -105,7 +105,7 @@ gives you a message like::
|
|||
|
||||
.. |Adding Python to DOS Path| image:: python-video-icon.png
|
||||
.. _`Adding Python to DOS Path`:
|
||||
http://showmedo.com/videos/video?name=960000&fromSeriesID=96
|
||||
http://showmedo.com/videotutorials/video?name=960000&fromSeriesID=96
|
||||
|
||||
|
||||
or::
|
||||
|
|
|
@ -543,7 +543,7 @@ learn more about submitting patches to Python.
|
|||
|
||||
* `Writing Programs with NCURSES <http://invisible-island.net/ncurses/ncurses-intro.html>`_:
|
||||
a lengthy tutorial for C programmers.
|
||||
* `The ncurses man page <http://www.linuxmanpages.com/man3/ncurses.3x.php>`_
|
||||
* `The ncurses man page <http://linux.die.net/man/3/ncurses>`_
|
||||
* `The ncurses FAQ <http://invisible-island.net/ncurses/ncurses.faq.html>`_
|
||||
* `"Use curses... don't swear" <http://www.youtube.com/watch?v=eN1eZtjLEnU>`_:
|
||||
video of a PyCon 2013 talk on controlling terminals using curses or Urwid.
|
||||
|
|
|
@ -127,7 +127,7 @@ The implementation details are in :c:func:`super_getattro()` in
|
|||
:source:`Objects/typeobject.c`. and a pure Python equivalent can be found in
|
||||
`Guido's Tutorial`_.
|
||||
|
||||
.. _`Guido's Tutorial`: https://www.python.org/2.2.3/descrintro.html#cooperation
|
||||
.. _`Guido's Tutorial`: https://www.python.org/download/releases/2.2.3/descrintro/#cooperation
|
||||
|
||||
The details above show that the mechanism for descriptors is embedded in the
|
||||
:meth:`__getattribute__()` methods for :class:`object`, :class:`type`, and
|
||||
|
|
|
@ -86,11 +86,11 @@ that you can make sure that you detect breakage during the transition. Tests als
|
|||
tend to be simpler than the code they are testing so it gives you an idea of how
|
||||
easy it can be to port code.
|
||||
|
||||
Drop support for older Python versions if possible. `Python 2.5`_
|
||||
Drop support for older Python versions if possible. Python 2.5
|
||||
introduced a lot of useful syntax and libraries which have become idiomatic
|
||||
in Python 3. `Python 2.6`_ introduced future statements which makes
|
||||
in Python 3. Python 2.6 introduced future statements which makes
|
||||
compatibility much easier if you are going from Python 2 to 3.
|
||||
`Python 2.7`_ continues the trend in the stdlib. Choose the newest version
|
||||
Python 2.7 continues the trend in the stdlib. Choose the newest version
|
||||
of Python which you believe can be your minimum support version
|
||||
and work from there.
|
||||
|
||||
|
@ -144,19 +144,19 @@ for you.
|
|||
Support Python 2.7
|
||||
//////////////////
|
||||
|
||||
As a first step, make sure that your project is compatible with `Python 2.7`_.
|
||||
As a first step, make sure that your project is compatible with Python 2.7.
|
||||
This is just good to do as Python 2.7 is the last release of Python 2 and thus
|
||||
will be used for a rather long time. It also allows for use of the ``-3`` flag
|
||||
to Python to help discover places in your code where compatibility might be an
|
||||
issue (the ``-3`` flag is in Python 2.6 but Python 2.7 adds more warnings).
|
||||
|
||||
Try to Support `Python 2.6`_ and Newer Only
|
||||
///////////////////////////////////////////
|
||||
Try to Support Python 2.6 and Newer Only
|
||||
////////////////////////////////////////
|
||||
|
||||
While not possible for all projects, if you can support `Python 2.6`_ and newer
|
||||
While not possible for all projects, if you can support Python 2.6 and newer
|
||||
**only**, your life will be much easier. Various future statements, stdlib
|
||||
additions, etc. exist only in Python 2.6 and later which greatly assist in
|
||||
supporting Python 3. But if you project must keep support for `Python 2.5`_ then
|
||||
supporting Python 3. But if you project must keep support for Python 2.5 then
|
||||
it is still possible to simultaneously support Python 3.
|
||||
|
||||
Below are the benefits you gain if you only have to support Python 2.6 and
|
||||
|
@ -215,10 +215,10 @@ Discussed in more detail below, but you should use this future statement to
|
|||
prevent yourself from accidentally using implicit relative imports.
|
||||
|
||||
|
||||
Supporting `Python 2.5`_ and Newer Only
|
||||
///////////////////////////////////////
|
||||
Supporting Python 2.5 and Newer Only
|
||||
////////////////////////////////////
|
||||
|
||||
If you are supporting `Python 2.5`_ and newer there are still some features of
|
||||
If you are supporting Python 2.5 and newer there are still some features of
|
||||
Python that you can utilize.
|
||||
|
||||
|
||||
|
@ -230,11 +230,11 @@ Implicit relative imports (e.g., importing ``spam.bacon`` from within
|
|||
This future statement moves away from that and allows the use of explicit
|
||||
relative imports (e.g., ``from . import bacon``).
|
||||
|
||||
In `Python 2.5`_ you must use
|
||||
In Python 2.5 you must use
|
||||
the __future__ statement to get to use explicit relative imports and prevent
|
||||
implicit ones. In `Python 2.6`_ explicit relative imports are available without
|
||||
implicit ones. In Python 2.6 explicit relative imports are available without
|
||||
the statement, but you still want the __future__ statement to prevent implicit
|
||||
relative imports. In `Python 2.7`_ the __future__ statement is not needed. In
|
||||
relative imports. In Python 2.7 the __future__ statement is not needed. In
|
||||
other words, unless you are only supporting Python 2.7 or a version earlier
|
||||
than Python 2.5, use this __future__ statement.
|
||||
|
||||
|
@ -261,7 +261,7 @@ In Python 2.5 and earlier the syntax to access the current exception is::
|
|||
# Current exception is 'exc'.
|
||||
pass
|
||||
|
||||
This syntax changed in Python 3 (and backported to `Python 2.6`_ and later)
|
||||
This syntax changed in Python 3 (and backported to Python 2.6 and later)
|
||||
to::
|
||||
|
||||
try:
|
||||
|
@ -347,7 +347,7 @@ possibilities:
|
|||
Subclass ``object``
|
||||
'''''''''''''''''''
|
||||
|
||||
New-style classes have been around since `Python 2.2`_. You need to make sure
|
||||
New-style classes have been around since Python 2.2. You need to make sure
|
||||
you are subclassing from ``object`` to avoid odd edge cases involving method
|
||||
resolution order, etc. This continues to be totally valid in Python 3 (although
|
||||
unneeded as all classes implicitly inherit from ``object``).
|
||||
|
@ -610,12 +610,6 @@ please email the python-porting_ mailing list.
|
|||
.. _modernize: https://github.com/mitsuhiko/python-modernize
|
||||
.. _Porting to Python 3: http://python3porting.com/
|
||||
.. _PyPI: https://pypi.python.org/
|
||||
.. _Python 2.2: https://www.python.org/2.2.x
|
||||
.. _Python 2.5: https://www.python.org/2.5.x
|
||||
.. _Python 2.6: https://www.python.org/2.6.x
|
||||
.. _Python 2.7: https://www.python.org/2.7.x
|
||||
.. _Python 2.5: https://www.python.org/2.5.x
|
||||
.. _Python 3.3: https://www.python.org/3.3.x
|
||||
.. _Python 3 Packages: https://pypi.python.org/pypi?:action=browse&c=533&show=all
|
||||
.. _Python 3 Q & A: http://ncoghlan-devs-python-notes.readthedocs.org/en/latest/python3/questions_and_answers.html
|
||||
.. _python-porting: https://mail.python.org/mailman/listinfo/python-porting
|
||||
|
|
|
@ -493,10 +493,11 @@ The documentation for the :mod:`unicodedata` module.
|
|||
|
||||
The documentation for the :mod:`codecs` module.
|
||||
|
||||
Marc-André Lemburg gave `a presentation titled "Python and Unicode" (PDF slides) <http://downloads.egenix.com/python/Unicode-EPC2002-Talk.pdf>`_ at
|
||||
EuroPython 2002. The slides are an excellent overview of the design
|
||||
of Python 2's Unicode features (where the Unicode string type is
|
||||
called ``unicode`` and literals start with ``u``).
|
||||
Marc-André Lemburg gave `a presentation titled "Python and Unicode" (PDF slides)
|
||||
<https://downloads.egenix.com/python/Unicode-EPC2002-Talk.pdf>`_ at
|
||||
EuroPython 2002. The slides are an excellent overview of the design of Python
|
||||
2's Unicode features (where the Unicode string type is called ``unicode`` and
|
||||
literals start with ``u``).
|
||||
|
||||
|
||||
Reading and Writing Unicode Data
|
||||
|
@ -696,13 +697,20 @@ encoding the data and writing it back out.
|
|||
References
|
||||
----------
|
||||
|
||||
One section of `Mastering Python 3 Input/Output <http://pyvideo.org/video/289/pycon-2010--mastering-python-3-i-o>`_, a PyCon 2010 talk by David Beazley, discusses text processing and binary data handling.
|
||||
One section of `Mastering Python 3 Input/Output
|
||||
<http://pyvideo.org/video/289/pycon-2010--mastering-python-3-i-o>`_,
|
||||
a PyCon 2010 talk by David Beazley, discusses text processing and binary data handling.
|
||||
|
||||
The `PDF slides for Marc-André Lemburg's presentation "Writing Unicode-aware Applications in Python" <http://downloads.egenix.com/python/LSM2005-Developing-Unicode-aware-applications-in-Python.pdf>`_
|
||||
The `PDF slides for Marc-André Lemburg's presentation "Writing Unicode-aware
|
||||
Applications in Python"
|
||||
<https://downloads.egenix.com/python/LSM2005-Developing-Unicode-aware-applications-in-Python.pdf>`_
|
||||
discuss questions of character encodings as well as how to internationalize
|
||||
and localize an application. These slides cover Python 2.x only.
|
||||
|
||||
`The Guts of Unicode in Python <http://pyvideo.org/video/1768/the-guts-of-unicode-in-python>`_ is a PyCon 2013 talk by Benjamin Peterson that discusses the internal Unicode representation in Python 3.3.
|
||||
`The Guts of Unicode in Python
|
||||
<http://pyvideo.org/video/1768/the-guts-of-unicode-in-python>`_
|
||||
is a PyCon 2013 talk by Benjamin Peterson that discusses the internal Unicode
|
||||
representation in Python 3.3.
|
||||
|
||||
|
||||
Acknowledgements
|
||||
|
|
|
@ -573,9 +573,7 @@ Footnotes
|
|||
This document was reviewed and revised by John Lee.
|
||||
|
||||
.. [#] Like Google for example. The *proper* way to use google from a program
|
||||
is to use `PyGoogle <http://pygoogle.sourceforge.net>`_ of course. See
|
||||
`Voidspace Google <http://www.voidspace.org.uk/python/recipebook.shtml#google>`_
|
||||
for some examples of using the Google API.
|
||||
is to use `PyGoogle <http://pygoogle.sourceforge.net>`_ of course.
|
||||
.. [#] Browser sniffing is a very bad practise for website design - building
|
||||
sites using web standards is much more sensible. Unfortunately a lot of
|
||||
sites still send different versions to different browsers.
|
||||
|
@ -589,5 +587,5 @@ This document was reviewed and revised by John Lee.
|
|||
scripts with a localhost server, I have to prevent urllib from using
|
||||
the proxy.
|
||||
.. [#] urllib opener for SSL proxy (CONNECT method): `ASPN Cookbook Recipe
|
||||
<http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/456195>`_.
|
||||
<http://code.activestate.com/recipes/456195/>`_.
|
||||
|
||||
|
|
|
@ -146,7 +146,7 @@ server may not be needed.
|
|||
tutorial also describes the most common gotchas that might arise.
|
||||
|
||||
* On lighttpd you need to use the `CGI module
|
||||
<http://redmine.lighttpd.net/wiki/lighttpd/Docs:ModCGI>`_\ , which can be configured
|
||||
<http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs_ModCGI>`_\ , which can be configured
|
||||
in a straightforward way. It boils down to setting ``cgi.assign`` properly.
|
||||
|
||||
|
||||
|
@ -210,7 +210,7 @@ mod_python
|
|||
----------
|
||||
|
||||
People coming from PHP often find it hard to grasp how to use Python in the web.
|
||||
Their first thought is mostly `mod_python <http://www.modpython.org/>`_\ ,
|
||||
Their first thought is mostly `mod_python <http://modpython.org/>`_\ ,
|
||||
because they think that this is the equivalent to ``mod_php``. Actually, there
|
||||
are many differences. What ``mod_python`` does is embed the interpreter into
|
||||
the Apache process, thus speeding up requests by not having to start a Python
|
||||
|
@ -260,13 +260,6 @@ the latter.
|
|||
These days, FastCGI is never used directly. Just like ``mod_python``, it is only
|
||||
used for the deployment of WSGI applications.
|
||||
|
||||
.. seealso::
|
||||
|
||||
* `FastCGI, SCGI, and Apache: Background and Future
|
||||
<http://www.vmunix.com/mark/blog/archives/2006/01/02/fastcgi-scgi-and-apache-background-and-future/>`_
|
||||
is a discussion on why the concept of FastCGI and SCGI is better than that
|
||||
of mod_python.
|
||||
|
||||
|
||||
Setting up FastCGI
|
||||
^^^^^^^^^^^^^^^^^^
|
||||
|
@ -280,8 +273,8 @@ Each web server requires a specific module.
|
|||
to be loaded by Apache.
|
||||
|
||||
* lighttpd ships its own `FastCGI module
|
||||
<http://redmine.lighttpd.net/wiki/lighttpd/Docs:ModFastCGI>`_ as well as an
|
||||
`SCGI module <http://redmine.lighttpd.net/wiki/lighttpd/Docs:ModSCGI>`_.
|
||||
<http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs_ModFastCGI>`_ as well as an
|
||||
`SCGI module <http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs_ModSCGI>`_.
|
||||
|
||||
* `nginx <http://nginx.org/>`_ also supports `FastCGI
|
||||
<http://wiki.nginx.org/NginxSimplePythonFCGI>`_.
|
||||
|
@ -315,7 +308,7 @@ FastCGI access.
|
|||
.. seealso::
|
||||
|
||||
There is some documentation on `setting up Django with FastCGI
|
||||
<http://docs.djangoproject.com/en/dev/howto/deployment/fastcgi/>`_, most of
|
||||
<https://docs.djangoproject.com/en/dev/howto/deployment/fastcgi/>`_, most of
|
||||
which can be reused for other WSGI-compliant frameworks and libraries.
|
||||
Only the ``manage.py`` part has to be changed, the example used here can be
|
||||
used instead. Django does more or less the exact same thing.
|
||||
|
@ -644,7 +637,7 @@ here. Instead we will briefly touch on some of the most popular.
|
|||
Django
|
||||
^^^^^^
|
||||
|
||||
`Django <http://www.djangoproject.com/>`_ is a framework consisting of several
|
||||
`Django <https://www.djangoproject.com/>`_ is a framework consisting of several
|
||||
tightly coupled elements which were written from scratch and work together very
|
||||
well. It includes an ORM which is quite powerful while being simple to use,
|
||||
and has a great online administration interface which makes it possible to edit
|
||||
|
@ -657,7 +650,7 @@ which make it possible to create web sites almost without writing any Python cod
|
|||
It has a big, international community, the members of which have created many
|
||||
web sites. There are also a lot of add-on projects which extend Django's normal
|
||||
functionality. This is partly due to Django's well written `online
|
||||
documentation <http://docs.djangoproject.com/>`_ and the `Django book
|
||||
documentation <https://docs.djangoproject.com/>`_ and the `Django book
|
||||
<http://www.djangobook.com/>`_.
|
||||
|
||||
|
||||
|
@ -665,7 +658,7 @@ documentation <http://docs.djangoproject.com/>`_ and the `Django book
|
|||
|
||||
Although Django is an MVC-style framework, it names the elements
|
||||
differently, which is described in the `Django FAQ
|
||||
<http://docs.djangoproject.com/en/dev/faq/general/#django-appears-to-be-a-mvc-framework-but-you-call-the-controller-the-view-and-the-view-the-template-how-come-you-don-t-use-the-standard-names>`_.
|
||||
<https://docs.djangoproject.com/en/dev/faq/general/#django-appears-to-be-a-mvc-framework-but-you-call-the-controller-the-view-and-the-view-the-template-how-come-you-don-t-use-the-standard-names>`_.
|
||||
|
||||
|
||||
TurboGears
|
||||
|
@ -708,7 +701,7 @@ access to these components to the wider Python community. There is even a
|
|||
separate framework based on the Zope components: `Grok
|
||||
<http://grok.zope.org/>`_.
|
||||
|
||||
Zope is also the infrastructure used by the `Plone <http://plone.org/>`_ content
|
||||
Zope is also the infrastructure used by the `Plone <https://plone.org/>`_ content
|
||||
management system, one of the most powerful and popular content management
|
||||
systems available.
|
||||
|
||||
|
|
|
@ -1012,7 +1012,7 @@ section :ref:`inst-config-files`.)
|
|||
|
||||
.. seealso::
|
||||
|
||||
`C++Builder Compiler <http://www.codegear.com/downloads/free/cppbuilder>`_
|
||||
`C++Builder Compiler <http://www.embarcadero.com/downloads>`_
|
||||
Information about the free C++ compiler from Borland, including links to the
|
||||
download pages.
|
||||
|
||||
|
@ -1084,7 +1084,7 @@ normal libraries do.
|
|||
|
||||
.. seealso::
|
||||
|
||||
`Building Python modules on MS Windows platform with MinGW <http://www.zope.org/Members/als/tips/win32_mingw_modules>`_
|
||||
`Building Python modules on MS Windows platform with MinGW <http://old.zope.org/Members/als/tips/win32_mingw_modules>`_
|
||||
Information about building the required libraries for the MinGW environment.
|
||||
|
||||
|
||||
|
@ -1093,7 +1093,7 @@ normal libraries do.
|
|||
.. [#] This also means you could replace all existing COFF-libraries with OMF-libraries
|
||||
of the same name.
|
||||
|
||||
.. [#] Check http://sources.redhat.com/cygwin/ and http://www.mingw.org/ for more
|
||||
.. [#] Check http://www.sourceware.org/cygwin/ and http://www.mingw.org/ for more
|
||||
information
|
||||
|
||||
.. [#] Then you have no POSIX emulation available, but you also don't need
|
||||
|
|
|
@ -104,7 +104,7 @@ into an active virtual environment uses the commands shown above.
|
|||
.. seealso::
|
||||
|
||||
`Python Packaging User Guide: Installing Python Distribution Packages
|
||||
<https://packaging.python.org/en/latest/installing.html#installing-python-distributions>`__
|
||||
<https://packaging.python.org/en/latest/installing.html#installing-python-distribution-packages>`__
|
||||
|
||||
|
||||
How do I ...?
|
||||
|
@ -122,7 +122,7 @@ User Guide.
|
|||
.. seealso::
|
||||
|
||||
`Python Packaging User Guide: Setup for Installing Distribution Packages
|
||||
<https://packaging.python.org/en/latest/installing.html#setup-for-installing-distributions>`__
|
||||
<https://packaging.python.org/en/latest/installing.html#setup-for-installing-distribution-packages>`__
|
||||
|
||||
|
||||
.. installing-per-user-installation:
|
||||
|
@ -141,13 +141,13 @@ A number of scientific Python packages have complex binary dependencies, and
|
|||
aren't currently easy to install using ``pip`` directly. At this point in
|
||||
time, it will often be easier for users to install these packages by
|
||||
`other means
|
||||
<https://packaging.python.org/en/latest/platforms.html#installing-scientific-packages>`__
|
||||
<https://packaging.python.org/en/latest/science.html>`__
|
||||
rather than attempting to install them with ``pip``.
|
||||
|
||||
.. seealso::
|
||||
|
||||
`Python Packaging User Guide: Installing Scientific Packages
|
||||
<https://packaging.python.org/en/latest/platforms.html#installing-scientific-packages>`__
|
||||
<https://packaging.python.org/en/latest/science.html>`__
|
||||
|
||||
|
||||
... work with multiple versions of Python installed in parallel?
|
||||
|
@ -210,7 +210,7 @@ as users are more regularly able to install pre-built extensions rather
|
|||
than needing to build them themselves.
|
||||
|
||||
Some of the solutions for installing `scientific software
|
||||
<https://packaging.python.org/en/latest/platforms.html#installing-scientific-packages>`__
|
||||
<https://packaging.python.org/en/latest/science.html>`__
|
||||
that is not yet available as pre-built ``wheel`` files may also help with
|
||||
obtaining other binary extensions without needing to build them locally.
|
||||
|
||||
|
|
|
@ -109,7 +109,7 @@ The class can be used to simulate nested scopes and is useful in templating.
|
|||
writing to any mapping in the chain.
|
||||
|
||||
* Django's `Context class
|
||||
<http://code.djangoproject.com/browser/django/trunk/django/template/context.py>`_
|
||||
<https://github.com/django/django/blob/master/django/template/context.py>`_
|
||||
for templating is a read-only chain of mappings. It also features
|
||||
pushing and popping of contexts similar to the
|
||||
:meth:`~collections.ChainMap.new_child` method and the
|
||||
|
|
|
@ -327,9 +327,9 @@ diffs. For comparing directories and files, see also, the :mod:`filecmp` module.
|
|||
|
||||
.. seealso::
|
||||
|
||||
`Pattern Matching: The Gestalt Approach <http://www.ddj.com/184407970?pgno=5>`_
|
||||
`Pattern Matching: The Gestalt Approach <http://www.drdobbs.com/database/pattern-matching-the-gestalt-approach/184407970>`_
|
||||
Discussion of a similar algorithm by John W. Ratcliff and D. E. Metzener. This
|
||||
was published in `Dr. Dobb's Journal <http://www.ddj.com/>`_ in July, 1988.
|
||||
was published in `Dr. Dobb's Journal <http://www.drdobbs.com/>`_ in July, 1988.
|
||||
|
||||
|
||||
.. _sequence-matcher:
|
||||
|
|
|
@ -4,7 +4,7 @@ Software Packaging and Distribution
|
|||
|
||||
These libraries help you with publishing and installing Python software.
|
||||
While these modules are designed to work in conjunction with the
|
||||
`Python Package Index <https://pypi.python.org>`__, they can also be used
|
||||
`Python Package Index <https://pypi.python.org/pypi>`__, they can also be used
|
||||
with a local index server, or without any index server at all.
|
||||
|
||||
.. toctree::
|
||||
|
|
|
@ -72,7 +72,7 @@ The :mod:`functools` module defines the following functions:
|
|||
bypassing the cache, or for rewrapping the function with a different cache.
|
||||
|
||||
An `LRU (least recently used) cache
|
||||
<http://en.wikipedia.org/wiki/Cache_algorithms#Least_Recently_Used>`_ works
|
||||
<http://en.wikipedia.org/wiki/Cache_algorithms#Examples>`_ works
|
||||
best when the most recent calls are the best predictors of upcoming calls (for
|
||||
example, the most popular articles on a news server tend to change each day).
|
||||
The cache's size limit assures that the cache does not grow without bound on
|
||||
|
|
|
@ -460,7 +460,7 @@ translatable. `Babel <http://babel.pocoo.org/>`__ is a Python
|
|||
internationalization library that includes a :file:`pybabel` script to
|
||||
extract and compile message catalogs. François Pinard's program
|
||||
called :program:`xpot` does a similar job and is available as part of
|
||||
his `po-utils package <http://po-utils.progiciels-bpi.ca/>`__.
|
||||
his `po-utils package <https://github.com/pinard/po-utils>`__.
|
||||
|
||||
(Python also includes pure-Python versions of these programs, called
|
||||
:program:`pygettext.py` and :program:`msgfmt.py`; some Python distributions
|
||||
|
|
|
@ -115,7 +115,7 @@ The following classes are provided:
|
|||
:mod:`http.cookiejar` and :mod:`http.cookies` modules do not depend on each
|
||||
other.
|
||||
|
||||
http://wp.netscape.com/newsref/std/cookie_spec.html
|
||||
http://curl.haxx.se/rfc/cookie_spec.html
|
||||
The specification of the original Netscape cookie protocol. Though this is
|
||||
still the dominant protocol, the 'Netscape cookie protocol' implemented by all
|
||||
the major browsers (and :mod:`http.cookiejar`) only bears a passing resemblance to
|
||||
|
|
|
@ -487,7 +487,7 @@ Supported mailbox formats are Maildir, mbox, MH, Babyl, and MMDF.
|
|||
`Configuring Netscape Mail on Unix: Why The Content-Length Format is Bad <http://www.jwz.org/doc/content-length.html>`_
|
||||
An argument for using the original mbox format rather than a variation.
|
||||
|
||||
`"mbox" is a family of several mutually incompatible mailbox formats <http://homepages.tesco.net./~J.deBoynePollard/FGA/mail-mbox-formats.html>`_
|
||||
`"mbox" is a family of several mutually incompatible mailbox formats <http://homepage.ntlworld.com/jonathan.deboynepollard/FGA/mail-mbox-formats.html>`_
|
||||
A history of mbox variations.
|
||||
|
||||
|
||||
|
|
|
@ -120,9 +120,9 @@ structures.
|
|||
|
||||
.. seealso::
|
||||
|
||||
`FCICreateFile <http://msdn.microsoft.com/library/default.asp?url=/library/en-us/devnotes/winprog/fcicreate.asp>`_
|
||||
`UuidCreate <http://msdn.microsoft.com/library/default.asp?url=/library/en-us/rpc/rpc/uuidcreate.asp>`_
|
||||
`UuidToString <http://msdn.microsoft.com/library/default.asp?url=/library/en-us/rpc/rpc/uuidtostring.asp>`_
|
||||
`FCICreateFile <http://msdn.microsoft.com/library?url=/library/en-us/devnotes/winprog/fcicreate.asp>`_
|
||||
`UuidCreate <http://msdn.microsoft.com/library?url=/library/en-us/rpc/rpc/uuidcreate.asp>`_
|
||||
`UuidToString <http://msdn.microsoft.com/library?url=/library/en-us/rpc/rpc/uuidtostring.asp>`_
|
||||
|
||||
.. _database-objects:
|
||||
|
||||
|
@ -151,9 +151,9 @@ Database Objects
|
|||
|
||||
.. seealso::
|
||||
|
||||
`MSIDatabaseOpenView <http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/msidatabaseopenview.asp>`_
|
||||
`MSIDatabaseCommit <http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/msidatabasecommit.asp>`_
|
||||
`MSIGetSummaryInformation <http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/msigetsummaryinformation.asp>`_
|
||||
`MSIDatabaseOpenView <http://msdn.microsoft.com/library?url=/library/en-us/msi/setup/msidatabaseopenview.asp>`_
|
||||
`MSIDatabaseCommit <http://msdn.microsoft.com/library?url=/library/en-us/msi/setup/msidatabasecommit.asp>`_
|
||||
`MSIGetSummaryInformation <http://msdn.microsoft.com/library?url=/library/en-us/msi/setup/msigetsummaryinformation.asp>`_
|
||||
|
||||
.. _view-objects:
|
||||
|
||||
|
@ -199,11 +199,11 @@ View Objects
|
|||
|
||||
.. seealso::
|
||||
|
||||
`MsiViewExecute <http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/msiviewexecute.asp>`_
|
||||
`MSIViewGetColumnInfo <http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/msiviewgetcolumninfo.asp>`_
|
||||
`MsiViewFetch <http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/msiviewfetch.asp>`_
|
||||
`MsiViewModify <http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/msiviewmodify.asp>`_
|
||||
`MsiViewClose <http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/msiviewclose.asp>`_
|
||||
`MsiViewExecute <http://msdn.microsoft.com/library?url=/library/en-us/msi/setup/msiviewexecute.asp>`_
|
||||
`MSIViewGetColumnInfo <http://msdn.microsoft.com/library?url=/library/en-us/msi/setup/msiviewgetcolumninfo.asp>`_
|
||||
`MsiViewFetch <http://msdn.microsoft.com/library?url=/library/en-us/msi/setup/msiviewfetch.asp>`_
|
||||
`MsiViewModify <http://msdn.microsoft.com/library?url=/library/en-us/msi/setup/msiviewmodify.asp>`_
|
||||
`MsiViewClose <http://msdn.microsoft.com/library?url=/library/en-us/msi/setup/msiviewclose.asp>`_
|
||||
|
||||
.. _summary-objects:
|
||||
|
||||
|
@ -243,10 +243,10 @@ Summary Information Objects
|
|||
|
||||
.. seealso::
|
||||
|
||||
`MsiSummaryInfoGetProperty <http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/msisummaryinfogetproperty.asp>`_
|
||||
`MsiSummaryInfoGetPropertyCount <http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/msisummaryinfogetpropertycount.asp>`_
|
||||
`MsiSummaryInfoSetProperty <http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/msisummaryinfosetproperty.asp>`_
|
||||
`MsiSummaryInfoPersist <http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/msisummaryinfopersist.asp>`_
|
||||
`MsiSummaryInfoGetProperty <http://msdn.microsoft.com/library?url=/library/en-us/msi/setup/msisummaryinfogetproperty.asp>`_
|
||||
`MsiSummaryInfoGetPropertyCount <http://msdn.microsoft.com/library?url=/library/en-us/msi/setup/msisummaryinfogetpropertycount.asp>`_
|
||||
`MsiSummaryInfoSetProperty <http://msdn.microsoft.com/library?url=/library/en-us/msi/setup/msisummaryinfosetproperty.asp>`_
|
||||
`MsiSummaryInfoPersist <http://msdn.microsoft.com/library?url=/library/en-us/msi/setup/msisummaryinfopersist.asp>`_
|
||||
|
||||
.. _record-objects:
|
||||
|
||||
|
@ -297,11 +297,11 @@ Record Objects
|
|||
|
||||
.. seealso::
|
||||
|
||||
`MsiRecordGetFieldCount <http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/msirecordgetfieldcount.asp>`_
|
||||
`MsiRecordSetString <http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/msirecordsetstring.asp>`_
|
||||
`MsiRecordSetStream <http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/msirecordsetstream.asp>`_
|
||||
`MsiRecordSetInteger <http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/msirecordsetinteger.asp>`_
|
||||
`MsiRecordClear <http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/msirecordclear.asp>`_
|
||||
`MsiRecordGetFieldCount <http://msdn.microsoft.com/library?url=/library/en-us/msi/setup/msirecordgetfieldcount.asp>`_
|
||||
`MsiRecordSetString <http://msdn.microsoft.com/library?url=/library/en-us/msi/setup/msirecordsetstring.asp>`_
|
||||
`MsiRecordSetStream <http://msdn.microsoft.com/library?url=/library/en-us/msi/setup/msirecordsetstream.asp>`_
|
||||
`MsiRecordSetInteger <http://msdn.microsoft.com/library?url=/library/en-us/msi/setup/msirecordsetinteger.asp>`_
|
||||
`MsiRecordClear <http://msdn.microsoft.com/library?url=/library/en-us/msi/setup/msirecordclear.asp>`_
|
||||
|
||||
.. _msi-errors:
|
||||
|
||||
|
@ -393,10 +393,10 @@ Directory Objects
|
|||
|
||||
.. seealso::
|
||||
|
||||
`Directory Table <http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/directory_table.asp>`_
|
||||
`File Table <http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/file_table.asp>`_
|
||||
`Component Table <http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/component_table.asp>`_
|
||||
`FeatureComponents Table <http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/featurecomponents_table.asp>`_
|
||||
`Directory Table <http://msdn.microsoft.com/library?url=/library/en-us/msi/setup/directory_table.asp>`_
|
||||
`File Table <http://msdn.microsoft.com/library?url=/library/en-us/msi/setup/file_table.asp>`_
|
||||
`Component Table <http://msdn.microsoft.com/library?url=/library/en-us/msi/setup/component_table.asp>`_
|
||||
`FeatureComponents Table <http://msdn.microsoft.com/library?url=/library/en-us/msi/setup/featurecomponents_table.asp>`_
|
||||
|
||||
.. _features:
|
||||
|
||||
|
@ -421,7 +421,7 @@ Features
|
|||
|
||||
.. seealso::
|
||||
|
||||
`Feature Table <http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/feature_table.asp>`_
|
||||
`Feature Table <http://msdn.microsoft.com/library?url=/library/en-us/msi/setup/feature_table.asp>`_
|
||||
|
||||
.. _msi-gui:
|
||||
|
||||
|
@ -516,13 +516,13 @@ for installing Python packages.
|
|||
|
||||
.. seealso::
|
||||
|
||||
`Dialog Table <http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/dialog_table.asp>`_
|
||||
`Control Table <http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/control_table.asp>`_
|
||||
`Control Types <http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/controls.asp>`_
|
||||
`ControlCondition Table <http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/controlcondition_table.asp>`_
|
||||
`ControlEvent Table <http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/controlevent_table.asp>`_
|
||||
`EventMapping Table <http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/eventmapping_table.asp>`_
|
||||
`RadioButton Table <http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/radiobutton_table.asp>`_
|
||||
`Dialog Table <http://msdn.microsoft.com/library?url=/library/en-us/msi/setup/dialog_table.asp>`_
|
||||
`Control Table <http://msdn.microsoft.com/library?url=/library/en-us/msi/setup/control_table.asp>`_
|
||||
`Control Types <http://msdn.microsoft.com/library?url=/library/en-us/msi/setup/controls.asp>`_
|
||||
`ControlCondition Table <http://msdn.microsoft.com/library?url=/library/en-us/msi/setup/controlcondition_table.asp>`_
|
||||
`ControlEvent Table <http://msdn.microsoft.com/library?url=/library/en-us/msi/setup/controlevent_table.asp>`_
|
||||
`EventMapping Table <http://msdn.microsoft.com/library?url=/library/en-us/msi/setup/eventmapping_table.asp>`_
|
||||
`RadioButton Table <http://msdn.microsoft.com/library?url=/library/en-us/msi/setup/radiobutton_table.asp>`_
|
||||
|
||||
.. _msi-tables:
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ available for Python:
|
|||
|
||||
`PyGObject <https://live.gnome.org/PyGObject>`_
|
||||
provides introspection bindings for C libraries using
|
||||
`GObject <http://developer.gnome.org/gobject/stable/>`_. One of
|
||||
`GObject <https://developer.gnome.org/gobject/stable/>`_. One of
|
||||
these libraries is the `GTK+ 3 <http://www.gtk.org/>`_ widget set.
|
||||
GTK+ comes with many more widgets than Tkinter provides. An online
|
||||
`Python GTK+ 3 Tutorial <http://python-gtk-3-tutorial.readthedocs.org/en/latest/>`_
|
||||
|
|
|
@ -37,7 +37,7 @@ or :class:`datetime.datetime` objects.
|
|||
|
||||
.. seealso::
|
||||
|
||||
`PList manual page <http://developer.apple.com/documentation/Darwin/Reference/ManPages/man5/plist.5.html>`_
|
||||
`PList manual page <https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man5/plist.5.html>`_
|
||||
Apple's documentation of the file format.
|
||||
|
||||
|
||||
|
|
|
@ -211,7 +211,7 @@ Example
|
|||
-------
|
||||
|
||||
To demonstrate several uses of the :func:`pprint` function and its parameters,
|
||||
let's fetch information about a project from `PyPI <https://pypi.python.org>`_::
|
||||
let's fetch information about a project from `PyPI <https://pypi.python.org/pypi>`_::
|
||||
|
||||
>>> import json
|
||||
>>> import pprint
|
||||
|
|
|
@ -160,10 +160,7 @@ The module defines the following:
|
|||
.. _devpoll-objects:
|
||||
|
||||
``/dev/poll`` Polling Objects
|
||||
----------------------------------------------
|
||||
|
||||
http://developers.sun.com/solaris/articles/using_devpoll.html
|
||||
http://developers.sun.com/solaris/articles/polling_efficient.html
|
||||
-----------------------------
|
||||
|
||||
Solaris and derivatives have ``/dev/poll``. While :c:func:`select` is
|
||||
O(highest file descriptor) and :c:func:`poll` is O(number of file
|
||||
|
|
|
@ -226,7 +226,7 @@ However, for reading convenience, most of the examples show sorted sequences.
|
|||
* Calculating the `median <http://www.ualberta.ca/~opscan/median.html>`_.
|
||||
|
||||
* The `SSMEDIAN
|
||||
<https://projects.gnome.org/gnumeric/doc/gnumeric-function-SSMEDIAN.shtml>`_
|
||||
<https://help.gnome.org/users/gnumeric/stable/gnumeric.html#gnumeric-function-SSMEDIAN>`_
|
||||
function in the Gnome Gnumeric spreadsheet, including `this discussion
|
||||
<https://mail.gnome.org/archives/gnumeric-list/2011-April/msg00018.html>`_.
|
||||
|
||||
|
|
|
@ -549,7 +549,7 @@ Calls to the date constructor are recorded in the `mock_date` attributes
|
|||
|
||||
An alternative way of dealing with mocking dates, or other builtin classes,
|
||||
is discussed in `this blog entry
|
||||
<http://williamjohnbert.com/2011/07/how-to-unit-testing-in-django-with-mocking-and-patching/>`_.
|
||||
<http://www.williamjohnbert.com/2011/07/how-to-unit-testing-in-django-with-mocking-and-patching/>`_.
|
||||
|
||||
|
||||
Mocking a Generator Method
|
||||
|
@ -1254,4 +1254,4 @@ As of version 1.5, the Python testing library `PyHamcrest
|
|||
<https://pypi.python.org/pypi/PyHamcrest>`_ provides similar functionality,
|
||||
that may be useful here, in the form of its equality matcher
|
||||
(`hamcrest.library.integration.match_equality
|
||||
<http://pythonhosted.org/PyHamcrest/integration.html#hamcrest.library.integration.match_equality>`_).
|
||||
<http://pythonhosted.org/PyHamcrest/integration.html#hamcrest.library.integration.match_equality.match_equality>`_).
|
||||
|
|
|
@ -67,7 +67,7 @@ test runner
|
|||
a GUI tool for test discovery and execution. This is intended largely for ease of use
|
||||
for those new to unit testing. For production environments it is
|
||||
recommended that tests be driven by a continuous integration system such as
|
||||
`Buildbot <http://buildbot.net/trac>`_, `Jenkins <http://jenkins-ci.org>`_
|
||||
`Buildbot <http://buildbot.net/>`_, `Jenkins <http://jenkins-ci.org/>`_
|
||||
or `Hudson <http://hudson-ci.org/>`_.
|
||||
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ https://www.python.org/psf/) was formed, a non-profit organization created
|
|||
specifically to own Python-related Intellectual Property. Zope Corporation is a
|
||||
sponsoring member of the PSF.
|
||||
|
||||
All Python releases are Open Source (see http://www.opensource.org/ for the Open
|
||||
All Python releases are Open Source (see http://opensource.org/ for the Open
|
||||
Source Definition). Historically, most, but not all, Python releases have also
|
||||
been GPL-compatible; the table below summarizes the various releases.
|
||||
|
||||
|
|
|
@ -901,7 +901,7 @@ References
|
|||
|
||||
The import machinery has evolved considerably since Python's early days. The
|
||||
original `specification for packages
|
||||
<https://www.python.org/doc/essays/packages.html>`_ is still available to read,
|
||||
<http://legacy.python.org/doc/essays/packages.html>`_ is still available to read,
|
||||
although some details have changed since the writing of that document.
|
||||
|
||||
The original specification for :data:`sys.meta_path` was :pep:`302`, with
|
||||
|
|
|
@ -66,7 +66,7 @@ IronPython
|
|||
An alternate Python for .NET. Unlike Python.NET, this is a complete Python
|
||||
implementation that generates IL, and compiles Python code directly to .NET
|
||||
assemblies. It was created by Jim Hugunin, the original creator of Jython. For
|
||||
more information, see `the IronPython website <http://www.ironpython.net/>`_.
|
||||
more information, see `the IronPython website <http://ironpython.net/>`_.
|
||||
|
||||
PyPy
|
||||
An implementation of Python written completely in Python. It supports several
|
||||
|
|
|
@ -38,12 +38,12 @@ More Python resources:
|
|||
|
||||
* https://docs.python.org: Fast access to Python's documentation.
|
||||
|
||||
* https://pypi.python.org: The Python Package Index, previously also nicknamed
|
||||
* https://pypi.python.org/pypi: The Python Package Index, previously also nicknamed
|
||||
the Cheese Shop, is an index of user-created Python modules that are available
|
||||
for download. Once you begin releasing code, you can register it here so that
|
||||
others can find it.
|
||||
|
||||
* http://aspn.activestate.com/ASPN/Python/Cookbook/: The Python Cookbook is a
|
||||
* http://code.activestate.com/recipes/langs/python/: The Python Cookbook is a
|
||||
sizable collection of code examples, larger modules, and useful scripts.
|
||||
Particularly notable contributions are collected in a book also titled Python
|
||||
Cookbook (O'Reilly & Associates, ISBN 0-596-00797-3.)
|
||||
|
|
|
@ -411,7 +411,7 @@ Options you shouldn't use
|
|||
|
||||
Reserved for use by Jython_.
|
||||
|
||||
.. _Jython: http://jython.org
|
||||
.. _Jython: http://www.jython.org/
|
||||
|
||||
|
||||
.. _using-on-envvars:
|
||||
|
|
|
@ -64,7 +64,7 @@ the Finder you first need an editor to create your script. Mac OS X comes with a
|
|||
number of standard Unix command line editors, :program:`vim` and
|
||||
:program:`emacs` among them. If you want a more Mac-like editor,
|
||||
:program:`BBEdit` or :program:`TextWrangler` from Bare Bones Software (see
|
||||
http://www.barebones.com/products/bbedit/index.shtml) are good choices, as is
|
||||
http://www.barebones.com/products/bbedit/index.html) are good choices, as is
|
||||
:program:`TextMate` (see http://macromates.com/). Other editors include
|
||||
:program:`Gvim` (http://macvim.org) and :program:`Aquamacs`
|
||||
(http://aquamacs.org/).
|
||||
|
@ -116,7 +116,7 @@ The IDE
|
|||
|
||||
MacPython ships with the standard IDLE development environment. A good
|
||||
introduction to using IDLE can be found at
|
||||
http://hkn.eecs.berkeley.edu/~dyoo/python/idle_intro/index.html.
|
||||
https://hkn.eecs.berkeley.edu/~dyoo/python/idle_intro/index.html.
|
||||
|
||||
|
||||
.. _mac-package-manager:
|
||||
|
@ -130,7 +130,7 @@ There are several methods to install additional Python packages:
|
|||
setup.py install``).
|
||||
|
||||
* Many packages can also be installed via the :program:`setuptools` extension
|
||||
or :program:`pip` wrapper, see http://www.pip-installer.org/.
|
||||
or :program:`pip` wrapper, see https://pip.pypa.io/.
|
||||
|
||||
|
||||
GUI Programming on the Mac
|
||||
|
@ -140,7 +140,7 @@ There are several options for building GUI applications on the Mac with Python.
|
|||
|
||||
*PyObjC* is a Python binding to Apple's Objective-C/Cocoa framework, which is
|
||||
the foundation of most modern Mac development. Information on PyObjC is
|
||||
available from http://pyobjc.sourceforge.net.
|
||||
available from https://pythonhosted.org/pyobjc/.
|
||||
|
||||
The standard Python GUI toolkit is :mod:`tkinter`, based on the cross-platform
|
||||
Tk toolkit (http://www.tcl.tk). An Aqua-native version of Tk is bundled with OS
|
||||
|
|
|
@ -67,7 +67,7 @@ Building Python
|
|||
If you want to compile CPython yourself, first thing you should do is get the
|
||||
`source <https://www.python.org/download/source/>`_. You can download either the
|
||||
latest release's source or just grab a fresh `clone
|
||||
<https://docs.python.org/devguide/setup#getting-the-source-code>`_. (If you want
|
||||
<https://docs.python.org/devguide/setup.html#getting-the-source-code>`_. (If you want
|
||||
to contribute patches, you will need a clone.)
|
||||
|
||||
The build process consists in the usual ::
|
||||
|
@ -145,5 +145,4 @@ Geany is an excellent IDE with support for a lot of languages. For more
|
|||
information, read: http://www.geany.org/
|
||||
|
||||
Komodo edit is another extremely good IDE. It also has support for a lot of
|
||||
languages. For more information, read:
|
||||
http://www.activestate.com/store/productdetail.aspx?prdGuid=20f4ed15-6684-4118-a78b-d37ff4058c5f
|
||||
languages. For more information, read http://komodoide.com/.
|
||||
|
|
|
@ -14,7 +14,7 @@ subdirectory (on Windows, this is ``Lib\site-packages``).
|
|||
.. seealso::
|
||||
|
||||
`Python Packaging User Guide: Creating and using virtual environments
|
||||
<https://packaging.python.org/en/latest/tutorial.html#creating-and-using-virtual-environments>`__
|
||||
<https://packaging.python.org/en/latest/installing.html#virtual-environments>`__
|
||||
|
||||
.. highlight:: none
|
||||
|
||||
|
|
|
@ -29,9 +29,8 @@ earlier are no longer supported (due to the lack of users or developers).
|
|||
Check :pep:`11` for details on all unsupported platforms.
|
||||
|
||||
* `Windows CE <http://pythonce.sourceforge.net/>`_ is still supported.
|
||||
* The `Cygwin <http://cygwin.com/>`_ installer offers to install the `Python
|
||||
interpreter <http://cygwin.com/packages/python>`_ as well; it is located under
|
||||
"Interpreters." (cf. `Cygwin package source
|
||||
* The `Cygwin <http://cygwin.com/>`_ installer offers to install the Python
|
||||
interpreter as well (cf. `Cygwin package source
|
||||
<ftp://ftp.uni-erlangen.de/pub/pc/gnuwin32/cygwin/mirrors/cygnus/
|
||||
release/python>`_, `Maintainer releases
|
||||
<http://www.tishler.net/jason/software/python/>`_)
|
||||
|
@ -45,9 +44,9 @@ for detailed information about platforms with pre-compiled installers.
|
|||
"7 Minutes to "Hello World!""
|
||||
by Richard Dooling, 2006
|
||||
|
||||
`Installing on Windows <http://diveintopython.net/installing_python/windows.html>`_
|
||||
`Installing on Windows <http://www.diveintopython.net/installing_python/windows.html>`_
|
||||
in "`Dive into Python: Python from novice to pro
|
||||
<http://diveintopython.net/index.html>`_"
|
||||
<http://www.diveintopython.net/>`_"
|
||||
by Mark Pilgrim, 2004,
|
||||
ISBN 1-59059-356-1
|
||||
|
||||
|
@ -67,7 +66,7 @@ key features:
|
|||
`ActivePython <http://www.activestate.com/activepython/>`_
|
||||
Installer with multi-platform compatibility, documentation, PyWin32
|
||||
|
||||
`Enthought Python Distribution <http://www.enthought.com/products/epd.php>`_
|
||||
`Enthought Python Distribution <https://www.enthought.com/products/epd/>`_
|
||||
Popular modules (such as PyWin32) with their respective documentation, tool
|
||||
suite for building extensible Python applications
|
||||
|
||||
|
@ -555,7 +554,7 @@ Compiling Python on Windows
|
|||
If you want to compile CPython yourself, first thing you should do is get the
|
||||
`source <https://www.python.org/download/source/>`_. You can download either the
|
||||
latest release's source or just grab a fresh `checkout
|
||||
<https://docs.python.org/devguide/setup#checking-out-the-code>`_.
|
||||
<https://docs.python.org/devguide/setup.html#checking-out-the-code>`_.
|
||||
|
||||
The source tree contains a build solution and project files for Microsoft
|
||||
Visual C++, which is the compiler used to build the official Python releases.
|
||||
|
|
Loading…
Reference in New Issue