Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 49 additions & 38 deletions docs/dev/env.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,31 +29,33 @@ following lines::

With these settings, newlines are inserted after 79 characters and indentation
is set to 4 spaces per tab. If you also use Vim for other languages, there is a
handy plugin called indent_, which handles indentation settings for Python source
files.
handy plugin called indent_, which handles indentation settings for Python
source files.

There is also a handy syntax plugin called syntax_ featuring some improvements over
the syntax file included in Vim 6.1.
There is also a handy syntax plugin called syntax_ featuring some improvements
over the syntax file included in Vim 6.1.

These plugins supply you with a basic environment for developing in Python.
To get the most out of Vim, you should continually check your code for syntax
errors and PEP8 compliance. Luckily PEP8_ and Pyflakes_ will do this for you.
If your Vim is compiled with :option:`+python` you can also utilize some very handy
plugins to do these checks from within the editor.
If your Vim is compiled with :option:`+python` you can also utilize some very
handy plugins to do these checks from within the editor.

For PEP8 checking, install the vim-pep8_ plugin, and for pyflakes you can
install vim-pyflakes_. Now you can map the functions ``Pep8()`` or ``Pyflakes()``
to any hotkey or action you want in Vim. Both plugins will display errors at
the bottom of the screen, and provide an easy way to jump to the corresponding
line. It's very handy to call these functions whenever you save a file. In
order to do this, add the following lines to your :file:`.vimrc`::
install vim-pyflakes_. Now you can map the functions ``Pep8()`` or
``Pyflakes()`` to any hotkey or action you want in Vim. Both plugins will
display errors at the bottom of the screen, and provide an easy way to jump to
the corresponding line. It's very handy to call these functions whenever you
save a file. In order to do this, add the following lines to your
:file:`.vimrc`::

autocmd BufWritePost *.py call Pyflakes()
autocmd BufWritePost *.py call Pep8()

If you are already using syntastic_, you can set it to run Pyflakes on write
and show errors and warnings in the quickfix window. An example configuration
to do that which also shows status and warning messages in the statusbar would be::
to do that which also shows status and warning messages in the statusbar would
be::

set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
Expand Down Expand Up @@ -112,8 +114,8 @@ TextMate
--------

`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
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.

Sublime Text
Expand All @@ -124,18 +126,21 @@ Sublime Text
extraordinary features and amazing performance.

Sublime Text has excellent support for editing Python code and uses Python for
its plugin API. It also has a diverse variety of plugins, `some of which <https://github.com/SublimeLinter/SublimeLinter>`_
allow for in-editor PEP8 checking and code "linting".
its plugin API. It also has a diverse variety of plugins,
`some of which <https://github.com/SublimeLinter/SublimeLinter>`_ allow for
in-editor PEP8 checking and code "linting".

Atom
----

`Atom <https://atom.io/>`_ is a hackable text editor for the 21st century,
built on atom-shell, and based on everything we love about our favorite editors.
built on atom-shell, and based on everything we love about our favorite
editors.

Atom is web native (HTML, CSS, JS), focusing on modular design and easy plugin development.
It comes with native package control and plethora of packages. Recommended for Python
development is `Linter <https://github.com/AtomLinter/Linter>`_ combined with
Atom is web native (HTML, CSS, JS), focusing on modular design and easy plugin
development. It comes with native package control and plethora of packages.
Recommended for Python development is
`Linter <https://github.com/AtomLinter/Linter>`_ combined with
`linter-flake8 <https://github.com/AtomLinter/linter-flake8>`_.


Expand All @@ -147,9 +152,10 @@ PyCharm / IntelliJ IDEA

`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>`_.
There are two versions of PyCharm: Professional Edition (Free 30-day trial)
and Community Edition(Apache 2.0 License) with fewer features.
features can be brought to IntelliJ with the free
`Python Plug-In <http://plugins.intellij.net/plugin/?id=631>`_. There are two
versions of PyCharm: Professional Edition (Free 30-day trial) and Community
Edition(Apache 2.0 License) with fewer features.


Eclipse
Expand All @@ -172,9 +178,10 @@ Spyder
------

`Spyder <http://code.google.com/p/spyderlib/>`_ is an IDE specifically geared
toward working with scientific Python libraries (namely `Scipy <http://www.scipy.org/>`_).
It includes integration with pyflakes_, `pylint <http://www.logilab.org/857>`_
and `rope <http://rope.sourceforge.net/>`_.
toward working with scientific Python libraries (namely
`Scipy <http://www.scipy.org/>`_). It includes integration with pyflakes_,
`pylint <http://www.logilab.org/857>`_ and
`rope <http://rope.sourceforge.net/>`_.

Spyder is open-source (free), offers code completion, syntax highlighting,
a class and function browser, and object inspection.
Expand All @@ -195,11 +202,13 @@ NINJA-IDE

`NINJA-IDE <http://www.ninja-ide.org/>`_ (from the recursive acronym: "Ninja-IDE
Is Not Just Another IDE") is a cross-platform IDE, specially designed to build
Python applications, and runs on Linux/X11, Mac OS X and Windows desktop operating
systems. Installers for these platforms can be downloaded from the website.
Python applications, and runs on Linux/X11, Mac OS X and Windows desktop
operating systems. Installers for these platforms can be downloaded from the
website.

NINJA-IDE is open-source software (GPLv3 licence) and is developed in Python and
Qt. The source files can be downloaded from `GitHub <https://github.com/ninja-ide>`_.
NINJA-IDE is open-source software (GPLv3 licence) and is developed
in Python and Qt. The source files can be downloaded from
`GitHub <https://github.com/ninja-ide>`_.


Eric (The Eric Python IDE)
Expand All @@ -210,8 +219,8 @@ offering sourcecode autocompletion, syntax highlighting, support for version
control systems, python 3 support, integrated web browser, python shell,
integrated debugger and a flexible plug-in system. Written in python, it is
based on the Qt gui toolkit, integrating the Scintilla editor control. Eric
is an open-source software project (GPLv3 licence) with more than ten years of active
development.
is an open-source software project (GPLv3 licence) with more than ten years of
active development.


Interpreter Tools
Expand All @@ -221,15 +230,16 @@ Interpreter Tools
Virtual Environments
--------------------

A Virtual Environment is a tool to keep the dependencies required by different projects
in separate places, by creating virtual Python environments for them. 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.
A Virtual Environment is a tool to keep the dependencies required by different
projects in separate places, by creating virtual Python environments for them.
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.

For example, you can work on a project which requires Django 1.3 while also
maintaining a project which requires Django 1.0.

To start using and see more information: `Virtual Environments <http://github.com/kennethreitz/python-guide/blob/master/docs/dev/virtualenvs.rst>`_ docs.
To start using and see more information:
`Virtual Environments <http://github.com/kennethreitz/python-guide/blob/master/docs/dev/virtualenvs.rst>`_ docs.

Other Tools
:::::::::::
Expand Down Expand Up @@ -273,7 +283,8 @@ BPython
-------

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

* In-line syntax highlighting.
* Readline-like autocomplete with suggestions displayed as you type.
Expand Down
17 changes: 9 additions & 8 deletions docs/dev/virtualenvs.rst
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
Virtual Environments
====================

A Virtual Environment is a tool to keep the dependencies required by different projects
in separate places, by creating virtual Python environments for them. 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.
A Virtual Environment is a tool to keep the dependencies required by different
projects in separate places, by creating virtual Python environments for them.
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.

For example, you can work on a project which requires Django 1.3 while also
maintaining a project which requires Django 1.0.
Expand Down Expand Up @@ -32,10 +32,11 @@ Basic Usage
$ cd my_project_folder
$ virtualenv venv

``virtualenv venv`` will create a folder in the current directory which will contain
the Python executable files, and a copy of the ``pip`` library which you can use to
install other packages. The name of the virtual environment (in this case, it was ``venv``)
can be anything; omitting the name will place the files in the current directory instead.
``virtualenv venv`` will create a folder in the current directory which will
contain the Python executable files, and a copy of the ``pip`` library which you
can use to install other packages. The name of the virtual environment (in this
case, it was ``venv``) can be anything; omitting the name will place the files
in the current directory instead.

This creates a copy of Python in whichever directory you ran the command in,
placing it in a folder named :file:`venv`.
Expand Down
3 changes: 2 additions & 1 deletion docs/intro/duction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,5 @@ first-time Pythonista, and the authors to the Guide will gladly help if you
have any questions about the appropriateness, completeness, or accuracy of
a contribution.

To get started working on The Hitchhiker's Guide, see the :doc:`/notes/contribute` page.
To get started working on The Hitchhiker's Guide,
see the :doc:`/notes/contribute` page.
73 changes: 38 additions & 35 deletions docs/intro/learning.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ Beginner
The Python Tutorial
~~~~~~~~~~~~~~~~~~~~

This is the official tutorial. It covers all the basics, and offers a tour of the
language and the standard library. Recommended for those who need a quickstart
guide to the language.
This is the official tutorial. It covers all the basics, and offers a tour of
the language and the standard library. Recommended for those who need a
quickstart guide to the language.

`The Python Tutorial <http://docs.python.org/tutorial/index.html>`_

Expand All @@ -18,15 +18,16 @@ Learn Python Interactive Tutorial
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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.
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.

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


If you want a more traditional book, *Python For You and Me* is an
excellent resource for learning all aspects of the language.
If you want a more traditional book, *Python For You and Me* is an excellent
resource for learning all aspects of the language.

`Python for You and Me <http://pymbook.readthedocs.org/>`_

Expand Down Expand Up @@ -118,8 +119,8 @@ More information about test driven development can be found at these resources:
A Byte of Python
~~~~~~~~~~~~~~~~

A free introductory book that teaches Python at the beginner level, it assumes no
previous programming experience.
A free introductory book that teaches Python at the beginner level, it assumes
no previous programming experience.

`A Byte of Python for Python 2.x <http://www.ibiblio.org/swaroopch/byteofpython/read/>`_
`A Byte of Python for Python 3.x <http://swaroopch.com/notes/Python_en-Preface/>`_
Expand All @@ -131,8 +132,9 @@ Advanced
Pro Python
~~~~~~~~~~

This book is for intermediate to advanced Python programmers who are looking to understand how
and why Python works the way it does and how they can take their code to the next level.
This book is for intermediate to advanced Python programmers who are looking to
understand how and why Python works the way it does and how they can take their
code to the next level.

`Pro Python <http://propython.com>`_

Expand All @@ -158,8 +160,8 @@ A Guide to Python's Magic Methods
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This is a collection of blog posts by Rafe Kettler which explain 'magic methods'
in Python. Magic methods are surrounded by double underscores (i.e. __init__) and
can make classes and objects behave in different and magical ways.
in Python. Magic methods are surrounded by double underscores (i.e. __init__)
and can make classes and objects behave in different and magical ways.

`A Guide to Python's Magic Methods <http://www.rafekettler.com/magicmethods.html>`_

Expand All @@ -170,17 +172,17 @@ For Engineers and Scientists
A Primer on Scientific Programming with Python
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

A Primer on Scientific Programming with Python, written by Hans Petter Langtangen,
mainly covers Python's usage in the scientific field. In the book, examples are
chosen from mathematics and the natural sciences.
A Primer on Scientific Programming with Python, written by Hans Petter
Langtangen, mainly covers Python's usage in the scientific field. In the book,
examples are chosen from mathematics and the natural sciences.

`A Primer on Scientific Programming with Python <http://www.springer.com/mathematics/computational+science+%26+engineering/book/978-3-642-30292-3>`_

Numerical Methods in Engineering with Python
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Numerical Methods in Engineering with Python, written by Jaan Kiusalaas, puts the
emphasis on numerical methods and how to implement them in Python.
Numerical Methods in Engineering with Python, written by Jaan Kiusalaas,
puts the emphasis on numerical methods and how to implement them in Python.

`Numerical Methods in Engineering with Python <http://www.cambridge.org/us/academic/subjects/engineering/engineering-mathematics-and-programming/numerical-methods-engineering-python-2nd-edition>`_

Expand All @@ -190,19 +192,20 @@ Miscellaneous topics
Problem Solving with Algorithms and Data Structures
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Problem Solving with Algorithms and Data Structures covers a range of data structures and
algorithms. All concepts are illustrated with Python code along with interactive samples
that can be run directly in the browser.
Problem Solving with Algorithms and Data Structures covers a range of data
structures and algorithms. All concepts are illustrated with Python code along
with interactive samples that can be run directly in the browser.

`Problem Solving with Algorithms and Data Structures
<http://www.interactivepython.org/courselib/static/pythonds/index.html>`_

Programming Collective Intelligence
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Programming Collective Intelligence introduces a wide array of basic machine learning and
data mining methods. The exposition is not very mathematically formal, but rather focuses
on explaining the underlying intuition and shows how to implement the algorithms in Python.
Programming Collective Intelligence introduces a wide array of basic machine
learning and data mining methods. The exposition is not very mathematically
formal, but rather focuses on explaining the underlying intuition and shows
how to implement the algorithms in Python.

`Programming Collective Intelligence <http://shop.oreilly.com/product/9780596529321.do>`_

Expand All @@ -221,17 +224,17 @@ as writing C extensions.
The Python Language Reference
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This is Python's reference manual, it covers the syntax and the core semantics of the
language.
This is Python's reference manual, it covers the syntax and the core semantics
of the language.

`The Python Language Reference <http://docs.python.org/reference/index.html>`_

Python Pocket Reference
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Python Pocket Reference, written by Mark Lutz, is an easy to use reference to the
core language, with descriptions of commonly used modules and toolkits. It covers
Python 3 and 2.6 versions.
Python Pocket Reference, written by Mark Lutz, is an easy to use reference to
the core language, with descriptions of commonly used modules and toolkits. It
covers Python 3 and 2.6 versions.

`Python Pocket Reference <http://shop.oreilly.com/product/9780596158095.do>`_

Expand All @@ -248,11 +251,11 @@ Writing Idiomatic Python
~~~~~~~~~~~~~~~~~~~~~~~~

"Writing Idiomatic Python", written by Jeff Knupp, contains the most common and
important Python idioms in a format that maximizes identification and understanding.
Each idiom is presented as a recommendation of a way to write some commonly
used piece of code, followed by an explanation of why the idiom is important.
It also contains two code samples for each idiom: the "Harmful" way to write it
and the "Idiomatic" way.
important Python idioms in a format that maximizes identification and
understanding. Each idiom is presented as a recommendation of a way to write
some commonly used piece of code, followed by an explanation of why the idiom
is important. It also contains two code samples for each idiom: the "Harmful"
way to write it and the "Idiomatic" way.

`For Python 2.7.3+ <http://www.amazon.com/Writing-Idiomatic-Python-2-7-3-Knupp/dp/1482372177/>`_

Expand Down
8 changes: 4 additions & 4 deletions docs/intro/news.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ new releases, jobs, etc. related to Python.
Python News
~~~~~~~~~~~~~

Python News is the news section in the official Python web site (www.python.org). It briefly
highlights the news from the Python community.
Python News is the news section in the official Python web site
(www.python.org). It briefly highlights the news from the Python community.

`Python News <http://www.python.org/news/>`_

Import Python Weekly
~~~~~~~~~~~~~~~~

Weekly Python Newsletter containing Python Articles, Projects, Videos, Tweets delivered in your inbox.
Keep Your Python Programming Skills Updated.
Weekly Python Newsletter containing Python Articles, Projects, Videos, Tweets
delivered in your inbox. Keep Your Python Programming Skills Updated.

`Import Python Weekly Newsletter <http://www.importpython.com/newsletter/>`_
Loading