Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit be9ffbb

Browse filesBrowse files
author
Kenneth Reitz
committed
Merge remote-tracking branch 'origin/master'
2 parents 525c834 + 41bc074 commit be9ffbb
Copy full SHA for be9ffbb

File tree

Expand file treeCollapse file tree

11 files changed

+81
-36
lines changed
Filter options
Expand file treeCollapse file tree

11 files changed

+81
-36
lines changed

‎docs/dev/virtualenvs.rst

Copy file name to clipboardExpand all lines: docs/dev/virtualenvs.rst
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ where they were placed.
6060
virtualenvwrapper
6161
-----------------
6262

63-
`virtualenvwrapper <http://www.doughellmann.com/projects/virtualenvwrapper/>`_
63+
`virtualenvwrapper <http://virtualenvwrapper.readthedocs.org/en/latest/index.html>`_
6464
provides a set of commands which makes working with virtual environments much
6565
more pleasant. It also places all your virtual environments in one place.
6666

@@ -72,7 +72,7 @@ To install (make sure **virtualenv** is already installed):
7272
$ export WORKON_HOME=~/Envs
7373
$ source /usr/local/bin/virtualenvwrapper.sh
7474
75-
(`Full virtualenvwrapper install instructions <http://www.doughellmann.com/docs/virtualenvwrapper/#introduction>`_.)
75+
(`Full virtualenvwrapper install instructions <http://virtualenvwrapper.readthedocs.org/en/latest/install.html>`_.)
7676

7777
For Windows, you can use the `virtualenvwrapper-powershell <https://bitbucket.org/guillermooo/virtualenvwrapper-powershell>`_ clone.
7878

@@ -136,7 +136,7 @@ Other useful commands
136136
``lssitepackages``
137137
Shows contents of ``site-packages`` directory.
138138

139-
`Full list of virtualenvwrapper commands <http://www.doughellmann.com/docs/virtualenvwrapper/command_ref.html#managing-environments>`_.
139+
`Full list of virtualenvwrapper commands <http://virtualenvwrapper.readthedocs.org/en/latest/command_ref.html>`_.
140140

141141
autoenv
142142
-------

‎docs/intro/documentation.rst

Copy file name to clipboardExpand all lines: docs/intro/documentation.rst
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Official Documentation
66

77
The official Python Language and Library documentation can be found here:
88

9-
- `Python 2.x <http://docs.python.org/>`_
9+
- `Python 2.x <http://docs.python.org/2.7/>`_
1010
- `Python 3.x <http://docs.python.org/py3k/>`_
1111

1212

‎docs/intro/learning.rst

Copy file name to clipboardExpand all lines: docs/intro/learning.rst
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ A free introductory book that teaches python at the beginner level, it assumes n
9292
previous programming experience.
9393

9494
`A Byte of Python for Python 2.x <http://www.ibiblio.org/swaroopch/byteofpython/read/>`_
95-
`A Byte of Python for Python 3.x <http://www.swaroopch.org/notes/Python_en:Table_of_Contents>`_
95+
`A Byte of Python for Python 3.x <http://swaroopch.com/notes/Python_en-Preface/>`_
9696

9797

9898
Advanced
@@ -160,6 +160,8 @@ Python in a Nutshell, written by Alex Martelli, covers most cross-platform
160160
python's usage, from its syntax to built-in libraries to advanced topics such
161161
as writing C extensions.
162162

163+
`Python in a Nutshell <http://shop.oreilly.com/product/9780596001889.do>`_
164+
163165
The Python Language Reference
164166
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
165167

‎docs/scenarios/ci.rst

Copy file name to clipboardExpand all lines: docs/scenarios/ci.rst
+5-5Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ engine. Use it.
2626

2727
Buildbot
2828
--------
29-
`Buildbot <http://buildbot.net/buildbot/docs/current>`_ is a Python system to
29+
`Buildbot <http://docs.buildbot.net/current/>`_ is a Python system to
3030
automate the compile/test cycle to validate code changes.
3131

3232

@@ -38,7 +38,7 @@ Mule?
3838
Tox
3939
---
4040

41-
`tox <https://bitbucket.org/hpk42/tox>`_ is an automation tool providing
41+
`tox <http://tox.readthedocs.org/en/latest/>`_ is an automation tool providing
4242
packaging, testing and deployment of Python software right from the console or
4343
CI server. It is a generic virtualenv management and test command line tool
4444
which provides the following features:
@@ -53,7 +53,7 @@ which provides the following features:
5353

5454
Travis-CI
5555
---------
56-
`Travis-CI <http://travis-ci.org/>`_ is a distributed CI server which builds tests
56+
`Travis-CI <https://travis-ci.org/>`_ is a distributed CI server which builds tests
5757
for open source projects for free. It provides multiple workers to run Python tests
5858
on and seamlessly integrates with Github. You can even have it comment on your Pull
5959
Requests whether this particular changeset breaks the build or not. So if you are
@@ -83,6 +83,6 @@ notifications, before and after steps and much more. The
8383
`travis-ci docs <http://about.travis-ci.org/docs/>`_ explain all of those and are very
8484
thorough.
8585

86-
In order to activate testing for your project, go to `the travis-ci site <http://travis-ci.org/>`_
86+
In order to activate testing for your project, go to `the travis-ci site <https://travis-ci.org/>`_
8787
and login with your Github account. Then activate your project in your profile settings and that's
88-
it. From now on, your project's tests will be run on every push to Github.
88+
it. From now on, your project's tests will be run on every push to Github.

‎docs/scenarios/db.rst

Copy file name to clipboardExpand all lines: docs/scenarios/db.rst
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Nearly all Python database modules such as `sqlite3`, `psycopg` and
1111

1212
Tutorials that explain how to work with modules that conform to this interface can be found
1313
`here <http://halfcooked.com/presentations/osdc2006/python_databases.html>`__ and
14-
`here <http://www.amk.ca/python/writing/DB-API.html>`__.
14+
`here <http://web.archive.org/web/20120815130844/http://www.amk.ca/python/writing/DB-API.html>`__.
1515

1616
SQLAlchemy
1717
----------

‎docs/scenarios/gui.rst

Copy file name to clipboardExpand all lines: docs/scenarios/gui.rst
+14-1Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ GUI Applications
44

55
Qt
66
--
7-
Qt is a cross-platform application framework that is widely used for developing
7+
`Qt <http://qt-project.org/>`_ is a cross-platform application framework that is widely used for developing
88
software with a GUI but can also be used for non-GUI applications.
99

1010
PySide
@@ -87,3 +87,16 @@ source code to be executed as a standalone desktop application.
8787
`Python Wiki for PyjamasDesktop <http://wiki.python.org/moin/PyjamasDesktop>`_.
8888

8989
The main website; `pyjs Desktop <http://pyjs.org/>`_.
90+
91+
Camelot
92+
-------
93+
`Camelot <http://www.python-camelot.com>`_ provides components for building
94+
business applications on top of Python, SQLAlchemy and Qt. It is inspired by
95+
the Django admin interface.
96+
97+
You can use Camelot to develop both simple and complex business applications
98+
at warp speed.
99+
100+
The main resource for information is the website:
101+
http://www.python-camelot.com
102+
and the mailinglist https://groups.google.com/forum/#!forum/project-camelot

‎docs/scenarios/web.rst

Copy file name to clipboardExpand all lines: docs/scenarios/web.rst
+3-5Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ Support can be found on its `mailing list <http://werkzeug.pocoo.org/community/#
9292

9393
Tornado
9494
--------
95-
`Tornado <http://http://www.tornadoweb.org/>`_ is a scalable, non-blocking web server and web application framework with
95+
`Tornado <http://www.tornadoweb.org/>`_ is a scalable, non-blocking web server and web application framework with
9696
a relative simple usage. Tornado is known for his high performance.
9797
It was initially developed for `friendfeed <http://friendfeed.com/>`_ , a real time chat and blog system.
9898

@@ -152,7 +152,7 @@ lightweight, easy to use, and uses many UNIX idioms. Gunicorn is not designed
152152
to face the internet -- it was designed to run behind Nginx which buffers
153153
slow requests and takes care of other important considerations. A sample
154154
setup for Nginx + Gunicorn can be found in the
155-
`Gunicorn help <http://gunicorn.org/deploy.html>`_.
155+
`Gunicorn help <http://gunicorn.org/index.html#deployment>`_.
156156

157157
.. _uwsgi-ref:
158158

@@ -235,9 +235,7 @@ and Pinax applications. Gondor supports Django versions 1.2 and 1.3 on
235235
Python version 2.7, and can automatically configure your Django site if you
236236
use ``local_settings.py`` for site-specific configuration information.
237237

238-
Gondor publishes guides to deploying `Django projects
239-
<https://gondor.io/support/setting-up-django/>`_ and `Pinax projects
240-
<https://gondor.io/support/setting-up-pinax/>`_ on their platform.
238+
Gondor has a guide on deploying `Django projects <https://gondor.io/support/django/setup/>`_.
241239

242240

243241
Templating

‎docs/scenarios/xml.rst

Copy file name to clipboardExpand all lines: docs/scenarios/xml.rst
+39Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,42 @@ and then you can get the child elements name like this:
3232
3333
untangle also supports loading XML from a string or an URL.
3434

35+
xmltodict
36+
---------
37+
38+
`xmltodict <http://github.com/martinblech/xmltodict>`_ is another simple
39+
library that aims at making xml feel like working with json.
40+
41+
An xml file like this:
42+
43+
.. code-block:: xml
44+
45+
<mydocument has="an attribute">
46+
<and>
47+
<many>elements</many>
48+
<many>more elements</many>
49+
</and>
50+
<plus a="complex">
51+
element as well
52+
</plus>
53+
</mydocument>
54+
55+
can be loaded into a python dict like this:
56+
57+
.. code-block:: python
58+
59+
import xmltodict
60+
obj = xmltodict.parse('path/to/file.xml')
61+
62+
and then you can access elements, attributes and values like this:
63+
64+
.. code-block:: python
65+
66+
doc['mydocument']['@has'] # == u'an attribute'
67+
doc['mydocument']['and']['many'] # == [u'elements', u'more elements']
68+
doc['mydocument']['plus']['@a'] # == u'complex'
69+
doc['mydocument']['plus']['#text'] # == u'element as well'
70+
71+
xmltodict also lets you roundtrip back to xml with the unparse function,
72+
has a streaming mode suitable for handling files that don't fit in memory
73+
and supports namespaces.

‎docs/starting/install/osx.rst

Copy file name to clipboardExpand all lines: docs/starting/install/osx.rst
+1-6Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ line at the bottom of your ``~/.bashrc`` file
5454
5555
Now, we can install Python 2.7: ::
5656

57-
$ brew install python --framework
57+
$ brew install python
5858

5959
This will take a minute or two. Once that's complete, you'll have to add the
6060
new Python scripts directory to your ``PATH``
@@ -63,11 +63,6 @@ new Python scripts directory to your ``PATH``
6363
6464
export PATH=/usr/local/share/python:$PATH
6565
66-
The ``--framework`` option tells Homebrew to compile a Framework-style Python
67-
build, rather than a UNIX-style build. The outdated version of Python that
68-
Snow Leopard comes packaged with is built as a Framework, so this helps avoid
69-
some future module installation bugs.
70-
7166
7267
Distribute & Pip
7368
----------------

‎docs/starting/install/win.rst

Copy file name to clipboardExpand all lines: docs/starting/install/win.rst
+9-12Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -36,33 +36,30 @@ packages are installed, so it is a very useful addition.
3636
You do not need to install or configure anything else to use Python. Having
3737
said that, I would strongly recommend that you install the tools and libraries
3838
described in the next section before you start building Python applications for
39-
real-world use. In particular, you should always install Distribute, as it
39+
real-world use. In particular, you should always install Setuptools, as it
4040
makes it much easier for you to use other third-party Python libraries.
4141

42-
Distribute + Pip
42+
Setuptools + Pip
4343
----------------
4444

45-
The most crucial third-party Python software of all is Distribute, which
45+
The most crucial third-party Python software of all is Setuptools, which
4646
extends the packaging and installation facilities provided by the distutils in
47-
the standard library. Once you add Distribute to your Python system you can
47+
the standard library. Once you add Setuptools to your Python system you can
4848
download and install any compliant Python software product with a single
4949
command. It also enables you to add this network installation capability to
5050
your own Python software with very little work.
5151

52-
To obtain the latest version of Distribute for Windows, run the python script
53-
available here: `python-distribute <http://python-distribute.org/distribute_setup.py>`_
52+
To obtain the latest version of Setuptools for Windows, run the python script
53+
available here: `ez_setup.py <https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py>`_
5454

5555

5656
You'll now have a new command available to you: **easy_install**. It is
5757
considered by many to be deprecated, so we will install its replacement:
5858
**pip**. Pip allows for uninstallation of packages, and is actively maintained,
5959
unlike easy_install.
6060

61-
To install pip, simply open a command prompt and run
62-
63-
.. code-block:: console
64-
65-
> easy_install pip
61+
To install pip, run the python script available here:
62+
`get-pip.py <https://raw.github.com/pypa/pip/master/contrib/get-pip.py>`_
6663

6764

6865
Virtualenv
@@ -89,7 +86,7 @@ project's directory
8986

9087
.. code-block:: console
9188
92-
> virtualenv --distribute venv
89+
> virtualenv venv
9390
9491
To use an environment, run the ``activate.bat`` batch file in the ``Scripts``
9592
subdirectory of that environment. Your command prompt will change to show the

‎docs/writing/style.rst

Copy file name to clipboardExpand all lines: docs/writing/style.rst
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,8 @@ Unpacking
273273
~~~~~~~~~
274274

275275
If you know the length of a list or tuple, you can assign names to its
276-
elements with unpacking:
276+
elements with unpacking. For example, since ``enumerate()`` will provide
277+
a tuple of two elements for each item in list:
277278

278279
.. code-block:: python
279280

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.