Skip to content

Commit 3f9300b

Browse files
author
Kenneth Reitz
committed
Merge remote-tracking branch 'origin/master'
2 parents 3d16bf8 + 6357a30 commit 3f9300b

24 files changed

Lines changed: 981 additions & 212 deletions

docs/dev/env.rst

Lines changed: 31 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,10 @@ order to do this, add the following lines to your `vimrc`::
6363
TextMate
6464
--------
6565

66-
"`TextMate <http://macromates.com/>`_ brings Apple's approach to operating systems into the world of text editors. By bridging UNIX underpinnings and GUI, TextMate cherry-picks the best of both worlds to the benefit of expert scripters and novice users alike."
66+
"`TextMate <http://macromates.com/>`_ brings Apple's approach to operating
67+
systems into the world of text editors. By bridging UNIX underpinnings and GUI,
68+
TextMate cherry-picks the best of both worlds to the benefit of expert
69+
scripters and novice users alike."
6770

6871
Sublime Text
6972
------------
@@ -75,15 +78,18 @@ extraordinary features."
7578
Sublime Text has excellent support for editing Python code and uses Python for
7679
its plugin API.
7780

78-
`Sublime Text 2 <http://www.sublimetext.com/blog/articles/sublime-text-2-beta>`_ is currently in beta.
81+
`Sublime Text 2 <http://www.sublimetext.com/blog/articles/sublime-text-2-beta>`_
82+
is currently in beta.
7983

8084
IDEs
8185
::::
8286

8387
PyCharm / IntelliJ IDEA
8488
-----------------------
8589

86-
`PyCharm <http://www.jetbrains.com/pycharm/>`_ is developed by JetBrains, also known for IntelliJ IDEA. Both share the same code base and most of PyCharm's features can be brought to IntelliJ with the free `Python Plug-In <http://plugins.intellij.net/plugin/?id=631/>`_.
90+
`PyCharm <http://www.jetbrains.com/pycharm/>`_ is developed by JetBrains, also
91+
known for IntelliJ IDEA. Both share the same code base and most of PyCharm's
92+
features can be brought to IntelliJ with the free `Python Plug-In <http://plugins.intellij.net/plugin/?id=631/>`_.
8793

8894

8995
Eclipse
@@ -95,24 +101,28 @@ The most popular Eclipse plugin for Python development is Aptana's
95101

96102
Komodo IDE
97103
-----------
98-
`Komodo IDE <http://www.activestate.com/komodo-ide>`_ is developed by ActiveState and is a commercial IDE for Windows, Mac
104+
`Komodo IDE <http://www.activestate.com/komodo-ide>`_ is developed by
105+
ActiveState and is a commercial IDE for Windows, Mac
99106
and Linux.
100107

101108

102109
Spyder
103110
------
104111

105-
`Spyder <http://code.google.com/p/spyderlib/>`_ an IDE specifically geared toward working with scientific python libraries (namely `Scipy <http://www.scipy.org/>`_).
112+
`Spyder <http://code.google.com/p/spyderlib/>`_ an IDE specifically geared
113+
toward working with scientific python libraries (namely `Scipy <http://www.scipy.org/>`_).
106114
Includes integration with pyflakes_, `pylint <http://www.logilab.org/857>`_,
107115
and `rope <http://rope.sourceforge.net/>`_.
108116

109-
Spyder is open-source (free), offers code completion, syntax highlighting, class and function browser, and object inspection.
117+
Spyder is open-source (free), offers code completion, syntax highlighting,
118+
class and function browser, and object inspection.
110119

111120

112121
WingIDE
113122
-------
114123

115-
`WingIDE <http://wingware.com/>`_ a python specific IDE. Runs for Linux, Windows, and Mac (as an X11 application, which frustrates some Mac users).
124+
`WingIDE <http://wingware.com/>`_ a python specific IDE. Runs for Linux,
125+
Windows, and Mac (as an X11 application, which frustrates some Mac users).
116126

117127

118128
Interpreter Tools
@@ -122,8 +132,10 @@ Interpreter Tools
122132
virtualenv
123133
----------
124134

125-
Virtualenv is a tool to keep the dependencies required by different projects in separate places, by creating virtual Python environments for them.
126-
It solves the "Project X depends on version 1.x but, Project Y needs 4.x" dilemma and keeps your global site-packages directory clean and manageable.
135+
Virtualenv is a tool to keep the dependencies required by different projects
136+
in separate places, by creating virtual Python environments for them.
137+
It solves the "Project X depends on version 1.x but, Project Y needs 4.x"
138+
dilemma and keeps your global site-packages directory clean and manageable.
127139

128140
`virtualenv <http://www.virtualenv.org/en/latest/index.html>`_ creates
129141
a folder which contains all the necessary executables to contain the
@@ -195,7 +207,8 @@ control by adding it to the ignore list.
195207
virtualenvwrapper
196208
-----------------
197209

198-
`Virtualenvwrapper <http://pypi.python.org/pypi/virtualenvwrapper>`_ makes virtualenv a pleasure to use by wrapping the command line API with a nicer CLI.
210+
`Virtualenvwrapper <http://pypi.python.org/pypi/virtualenvwrapper>`_ makes
211+
virtualenv a pleasure to use by wrapping the command line API with a nicer CLI.
199212

200213
::
201214

@@ -208,7 +221,8 @@ Put this into your `~/.bash_profile` (Linux/Mac) file:
208221

209222
$ export VIRTUALENVWRAPPER_VIRTUALENV_ARGS='--no-site-packages'
210223

211-
This will prevent your virtualenvs from relying on your (global) site packages directory, so that they are completely separate..
224+
This will prevent your virtualenvs from relying on your (global) site packages
225+
directory, so that they are completely separate..
212226

213227
Other Tools
214228
:::::::::::
@@ -233,10 +247,12 @@ It provides following features:
233247
IPython
234248
-------
235249

236-
`IPython <http://ipython.org/>`_ provides a rich toolkit to help you make the most out of using Python interactively. Its main components are:
250+
`IPython <http://ipython.org/>`_ provides a rich toolkit to help you make the
251+
most out of using Python interactively. Its main components are:
237252

238253
* Powerful Python shells (terminal- and Qt-based).
239-
* A web-based notebook with the same core features but support for rich media, text, code, mathematical expressions and inline plots.
254+
* A web-based notebook with the same core features but support for rich media,
255+
text, code, mathematical expressions and inline plots.
240256
* Support for interactive data visualization and use of GUI toolkits.
241257
* Flexible, embeddable interpreters to load into your own projects.
242258
* Tools for high level and interactive parallel computing.
@@ -250,7 +266,8 @@ IPython
250266
BPython
251267
-------
252268

253-
`bpython <http://bpython-interpreter.org/>`_ is an alternative interface to the Python interpreter for Unix-like operating systems. It has the following features:
269+
`bpython <http://bpython-interpreter.org/>`_ is an alternative interface to the
270+
Python interpreter for Unix-like operating systems. It has the following features:
254271

255272
* In-line syntax highlighting.
256273
* Readline-like autocomplete with suggestions displayed as you type.

docs/dev/virtualenvs.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,3 +137,21 @@ Other useful commands
137137
Shows contents of ``site-packages`` directory.
138138

139139
`Full list of virtualenvwrapper commands <http://www.doughellmann.com/docs/virtualenvwrapper/command_ref.html#managing-environments>`_.
140+
141+
autoenv
142+
-------
143+
When you ``cd`` into a directory containing a ``.env`` `autoenv <https://github.com/kennethreitz/autoenv>`_
144+
automagically activates the environment.
145+
146+
Install it on Mac OS X using ``brew``:
147+
148+
.. code-block:: console
149+
150+
$ brew install autoenv
151+
152+
And on Linux:
153+
154+
.. code-block:: console
155+
156+
$ git clone git://github.com/kennethreitz/autoenv.git ~/.autoenv
157+
$ echo 'source ~/.autoenv/activate.sh' >> ~/.bashrc

docs/index.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,11 @@ The Hitchhiker's Guide to Python!
88

99
Welcome to The Hitchhiker's Guide to Python. `DON'T PANIC! <http://www.amazon.com/gp/product/B0043M4ZH0/ref=as_li_ss_tl?ie=UTF8&tag=bookforkind-20&linkCode=as2&camp=1789&creative=390957&creativeASIN=B0043M4ZH0>`_
1010

11-
**This guide is currently under heavy development, and is mostly a skeleton at the moment.** If you'd like to help, `fork us on GitHub <https://github.com/kennethreitz/python-guide>`_!
11+
**This guide is currently under heavy development, and is mostly a skeleton at
12+
the moment.** If you'd like to help, `fork us on GitHub <https://github.com/kennethreitz/python-guide>`_!
1213

13-
This *opinionated* guide exists to provide both novice and expert Python developers a best-practice handbook to the installation, configuration, and usage of Python on a daily basis.
14+
This *opinionated* guide exists to provide both novice and expert Python
15+
developers a best-practice handbook to the installation, configuration, and
16+
usage of Python on a daily basis.
1417

1518
.. include:: contents.rst.inc

docs/intro/community.rst

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,30 +4,35 @@ The Community
44
BDFL
55
----
66

7-
Guido van Rossum, the creator of Python, is often referred to as the BDFL — the Benevolent Dictator For Life.
7+
Guido van Rossum, the creator of Python, is often referred to as the BDFL — the
8+
Benevolent Dictator For Life.
89

910

1011

1112
Python Software Foundation
1213
--------------------------
1314

14-
The mission of the Python Software Foundation is to promote, protect, and advance the Python programming language, and to support and facilitate the growth of a diverse and international community of Python programmers.
15+
The mission of the Python Software Foundation is to promote, protect, and
16+
advance the Python programming language, and to support and facilitate the
17+
growth of a diverse and international community of Python programmers.
1518

1619
`Learn More about the PSF <http://www.python.org/psf/>`_.
1720

1821

1922
PEPs
2023
----
2124

22-
PEPs are *Python Enhancement Proposals*. They describe changes to Python itself, or the standards around it.
25+
PEPs are *Python Enhancement Proposals*. They describe changes to Python itself,
26+
or the standards around it.
2327

2428
There are three different types of PEPs (as defined by `PEP1 <http://www.python.org/dev/peps/pep-0001/>`_):
2529

2630
**Standards**
2731
Describes a new feature or implementation.
2832

2933
**Informational**
30-
Describes a design issue, general guidelines, or information to the community.
34+
Describes a design issue, general guidelines, or information to the
35+
community.
3136

3237
**Process**
3338
Describes a process related to Python.
@@ -45,29 +50,35 @@ There are a few PEPs that could be considered required reading:
4550
A list of 19 statements that briefly explain the philosophy behind Python.
4651

4752
- `PEP257 <http://www.python.org/dev/peps/pep-0257/>`_: Docstring Conventions.
48-
Gives guidelines for semantics and conventions associated with Python docstrings.
53+
Gives guidelines for semantics and conventions associated with Python
54+
docstrings.
4955

5056
You can read more at `The PEP Index <http://www.python.org/dev/peps/>`_.
5157

5258
Submitting a PEP
5359
~~~~~~~~~~~~~~~~
5460

55-
PEPs are peer-reviewed and accepted/rejected after much discussion. Anyone can write and submit a PEP for review.
61+
PEPs are peer-reviewed and accepted/rejected after much discussion. Anyone
62+
can write and submit a PEP for review.
5663

5764
Here's an overview of the PEP acceptance workflow:
5865

5966
.. image:: http://www.python.org/dev/peps/pep-0001/pep-0001-1.png
6067

6168

62-
Python Conferences
69+
Python Conferences
6370
--------------------------
6471

65-
The major events for the Python community are developer conferences. The two most notable conferences are PyCon, which is held in the US, and its European sibling, EuroPython.
72+
The major events for the Python community are developer conferences. The two
73+
most notable conferences are PyCon, which is held in the US, and its European
74+
sibling, EuroPython.
6675

6776
A comprehensive list of conferences is maintained `at pycon.org <http://www.pycon.org/>`_.
6877

6978

7079
Python User Groups
7180
--------------------------
7281

73-
User Groups are where a bunch of Python developers meet to present or talk about Python topics of interest. A list of local user groups is maintained at the `Python Software Foundation Wiki <http://wiki.python.org/moin/LocalUserGroups>`_.
82+
User Groups are where a bunch of Python developers meet to present or talk
83+
about Python topics of interest. A list of local user groups is maintained at
84+
the `Python Software Foundation Wiki <http://wiki.python.org/moin/LocalUserGroups>`_.

docs/intro/documentation.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ The official Python Language and Library documentation can be found here:
1313
Read the Docs
1414
-------------
1515

16-
Read the Docs is a popular community project, providing a single location for all documentation of popular and even more exotic Python modules.
16+
Read the Docs is a popular community project, providing a single location for
17+
all documentation of popular and even more exotic Python modules.
1718

1819
`Read the Docs <http://readthedocs.org/>`_
1920

docs/intro/learning.rst

Lines changed: 39 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -7,62 +7,70 @@ Beginner
77
Learn Python Interactive Tutorial
88
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
99

10-
Learnpython.org is an easy non-intimidating way to get introduced to python. The website takes the same approach used on the popular `Try Ruby <http://tryruby.org/>`_ website, it has an interactive python interpreter built into the site that allows you to go through the lessons without having to install Python locally.
10+
Learnpython.org is an easy non-intimidating way to get introduced to python.
11+
The website takes the same approach used on the popular `Try Ruby <http://tryruby.org/>`_
12+
website, it has an interactive python interpreter built into the site that
13+
allows you to go through the lessons without having to install Python locally.
1114

1215
`Learn Python <http://www.learnpython.org/>`_
1316

1417
Learn Python the Hard Way
1518
~~~~~~~~~~~~~~~~~~~~~~~~~
1619

17-
This is an excellent beginner programmer's guide to Python. It covers "hello world" from the console to the web.
20+
This is an excellent beginner programmer's guide to Python. It covers "hello
21+
world" from the console to the web.
1822

1923
`Learn Python the Hard Way <http://learnpythonthehardway.org/book/>`_
2024

2125

2226
Crash into Python
2327
~~~~~~~~~~~~~~~~~
2428

25-
Also known as *Python for Programmers with 3 Hours*, this guide gives experienced developers from other languages a crash course on Python.
29+
Also known as *Python for Programmers with 3 Hours*, this guide gives
30+
experienced developers from other languages a crash course on Python.
2631

2732
`Crash into Python <http://stephensugden.com/crash_into_python/>`_
2833

2934

3035
Dive Into Python 3
3136
~~~~~~~~~~~~~~~~~~
3237

33-
Dive Into Python 3 is a good book for those ready to jump in to Python 3. It's a
34-
good read if you are moving from Python 2 to 3 or if you already have some
38+
Dive Into Python 3 is a good book for those ready to jump in to Python 3. It's
39+
a good read if you are moving from Python 2 to 3 or if you already have some
3540
experience programming in another language.
3641

3742
`Dive Into Python 3 <http://diveintopython3.ep.io/>`_
3843

3944
Think Python: How to Think Like a Computer Scientist
4045
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4146

42-
Think Python attempts to give an introduction to basic concepts in computer science through the
43-
use of the python language. The focus was to create a book with plenty of exercises, minimal jargon and
44-
a section in each chapter devoted to the subject of debugging.
47+
Think Python attempts to give an introduction to basic concepts in computer
48+
science through the use of the python language. The focus was to create a book
49+
with plenty of exercises, minimal jargon and a section in each chapter devoted
50+
to the subject of debugging.
4551

46-
While exploring the various features available in the python language the author weaves in various design
47-
patterns and best practices.
52+
While exploring the various features available in the python language the
53+
author weaves in various design patterns and best practices.
4854

49-
The book also includes several case studies which have the reader explore the topics discussed in the book
50-
in greater detail by applying those topics to real-world examples. Case studies include assignments in GUI
51-
and Markov Analysis.
55+
The book also includes several case studies which have the reader explore the
56+
topics discussed in the book in greater detail by applying those topics to
57+
real-world examples. Case studies include assignments in GUI and Markov
58+
Analysis.
5259

5360
`Think Python <http://greenteapress.com/thinkpython/html/index.html>`_
5461

5562

56-
Python Koans
63+
Python Koans
5764
~~~~~~~~~~~~
5865

59-
Python Koans is a port of Edgecase's Ruby Koans. It uses a test-driven approach, q.v. TEST DRIVEN DESIGN SECTION
60-
to provide an interactive
61-
tutorial teaching basic python concepts. By fixing assertion statements that fail in a test script, this
62-
provides sequential steps to learning python.
66+
Python Koans is a port of Edgecase's Ruby Koans. It uses a test-driven
67+
approach, q.v. TEST DRIVEN DESIGN SECTION to provide an interactive tutorial
68+
teaching basic python concepts. By fixing assertion statements that fail in a
69+
test script, this provides sequential steps to learning python.
6370

64-
For those used to languages and figuring out puzzles on their own, this can be a fun, attractive option.
65-
For those new to python and programming, having an additional resource or reference will be helpful.
71+
For those used to languages and figuring out puzzles on their own, this can be
72+
a fun, attractive option. For those new to python and programming, having an
73+
additional resource or reference will be helpful.
6674

6775
`Python Koans <http://bitbucket.org/gregmalcolm/python_koans>`_
6876

@@ -94,3 +102,14 @@ chapters detail best practices with writing documentation, test-driven
94102
development, version control, and optimization/profiling.
95103

96104
`Expert Python Programming <http://www.packtpub.com/expert-python-programming/book>`_
105+
106+
107+
References
108+
----------
109+
110+
Python in a Nutshell
111+
~~~~~~~~~~~~~~~~~~~~
112+
113+
Python in a Nutshell, written by Alex Martelli, covers most cross-platform
114+
python's usage, from its syntax to built-in libraries to advanced topics such
115+
as writing C extensions.

0 commit comments

Comments
 (0)