@@ -5,40 +5,40 @@ Your Development Environment
55Text Editors
66::::::::::::
77
8- Just about anything which can edit plain text will work for writing Python code,
8+ Just about anything that can edit plain text will work for writing Python code,
99however, using a more powerful editor may make your life a bit easier.
1010
1111
12- VIM
12+ Vim
1313---
1414
1515Vim is a text editor which uses keyboard shortcuts for editing instead of menus
16- or icons. There exist a couple of plugins and settings for the VIM editor to
16+ or icons. There are a couple of plugins and settings for the Vim editor to
1717aid Python development. If you only develop in Python, a good start is to set
1818the default settings for indentation and line-wrapping to values compliant with
1919:pep: `8 `. In your home directory, open a file called :file: `.vimrc ` and add the
2020following lines::
2121
2222 set textwidth=79 " lines longer than 79 columns will be broken
2323 set shiftwidth=4 " operation >> indents 4 columns; << unindents 4 columns
24- set tabstop=4 " an hard TAB displays as 4 columns
24+ set tabstop=4 " a hard TAB displays as 4 columns
2525 set expandtab " insert spaces when hitting TABs
2626 set softtabstop=4 " insert/delete 4 spaces when hitting a TAB/BACKSPACE
2727 set shiftround " round indent to multiple of 'shiftwidth'
2828 set autoindent " align the new line indent with the previous line
2929
3030With these settings, newlines are inserted after 79 characters and indentation
31- is set to 4 spaces per tab. If you also use VIM for other languages, there is a
32- handy plugin at indent _, which handles indentation settings for Python source
31+ is set to 4 spaces per tab. If you also use Vim for other languages, there is a
32+ handy plugin called indent _, which handles indentation settings for Python source
3333files.
3434
35- There is also a handy syntax plugin at syntax _ featuring some improvements over
36- the syntax file included in VIM 6.1.
35+ There is also a handy syntax plugin called syntax _ featuring some improvements over
36+ the syntax file included in Vim 6.1.
3737
3838These plugins supply you with a basic environment for developing in Python.
3939To get the most out of Vim, you should continually check your code for syntax
4040errors and PEP8 compliance. Luckily PEP8 _ and Pyflakes _ will do this for you.
41- If your VIM is compiled with :option: `+python ` you can also utilize some very handy
41+ If your Vim is compiled with :option: `+python ` you can also utilize some very handy
4242plugins to do these checks from within the editor.
4343
4444For PEP8 checking, install the vim-pep8 _ plugin, and for pyflakes you can
@@ -51,7 +51,7 @@ order to do this, add the following lines to your :file:`.vimrc`::
5151 autocmd BufWritePost *.py call Pyflakes()
5252 autocmd BufWritePost *.py call Pep8()
5353
54- If you are already using syntastic _ you can enable it to run Pyflakes on write
54+ If you are already using syntastic _, you can set it to run Pyflakes on write
5555and show errors and warnings in the quickfix window. An example configuration
5656to do that which also shows status and warning messages in the statusbar would be::
5757
@@ -61,24 +61,26 @@ to do that which also shows status and warning messages in the statusbar would b
6161 let g:syntastic_auto_loc_list=1
6262 let g:syntastic_loc_list_height=5
6363
64+
6465Python-mode
6566^^^^^^^^^^^
6667
67- Python-mode _ is a complex solution in VIM for working with Python code.
68+ Python-mode _ is a complex solution for working with Python code in Vim .
6869It has:
6970
7071- Asynchronous Python code checking (``pylint ``, ``pyflakes ``, ``pep8 ``, ``mccabe ``) in any combination
7172- Code refactoring and autocompletion with Rope
7273- Fast Python folding
7374- Virtualenv support
74- - Search by Python documentation and run Python code
75+ - Search through Python documentation and run Python code
7576- Auto PEP8 _ error fixes
7677
7778And more.
7879
7980SuperTab
8081^^^^^^^^
81- SuperTab _ is a small VIM plugin that makes code completion more convenient by
82+
83+ SuperTab _ is a small Vim plugin that makes code completion more convenient by
8284using ``<Tab> `` key or any other customized keys.
8385
8486.. _indent : http://www.vim.org/scripts/script.php?script_id=974
@@ -94,9 +96,9 @@ using ``<Tab>`` key or any other customized keys.
9496Emacs
9597-----
9698
97- Emacs is a powerful text editor. It's fully programmable (lisp), but
98- it can be some work to wire up correctly. A good start if you're
99- already an Emacs user is `Python Programming in Emacs `_ at EmacsWiki.
99+ Emacs is another powerful text editor. It is fully programmable (lisp), but
100+ it can be some work to wire up correctly. A good start if you're already an
101+ Emacs user is `Python Programming in Emacs `_ at EmacsWiki.
100102
1011031. Emacs itself comes with a Python mode.
1021042. Python ships with an alternate version:
@@ -155,18 +157,18 @@ Spyder
155157
156158`Spyder <http://code.google.com/p/spyderlib/ >`_ is an IDE specifically geared
157159toward working with scientific Python libraries (namely `Scipy <http://www.scipy.org/ >`_).
158- It includes integration with pyflakes _, `pylint <http://www.logilab.org/857 >`_,
160+ It includes integration with pyflakes _, `pylint <http://www.logilab.org/857 >`_
159161and `rope <http://rope.sourceforge.net/ >`_.
160162
161163Spyder is open-source (free), offers code completion, syntax highlighting,
162- class and function browser, and object inspection.
164+ a class and function browser, and object inspection.
163165
164166
165167WingIDE
166168-------
167169
168170`WingIDE <http://wingware.com/ >`_ is a Python specific IDE. It runs on Linux,
169- Windows, and Mac (as an X11 application, which frustrates some Mac users).
171+ Windows and Mac (as an X11 application, which frustrates some Mac users).
170172
171173WingIDE offers code completion, syntax highlighting, source browser, graphical
172174debugger and support for version control systems.
@@ -196,8 +198,9 @@ It solves the "Project X depends on version 1.x but, Project Y needs 4.x"
196198dilemma, and keeps your global site-packages directory clean and manageable.
197199
198200`virtualenv <http://www.virtualenv.org/en/latest/index.html >`_ creates
199- a folder which contains all the necessary executables to contain the
200- packages that a Python project would need. An example workflow is given.
201+ a folder which contains all the necessary executables to use the
202+ packages that a Python project would need. An example workflow is given
203+ below.
201204
202205Install virtualenv:
203206
@@ -230,7 +233,7 @@ The name of the current virtual environment will now appear on the left
230233of the prompt (e.g. ``(venv)Your-Computer:your_project UserName$ ``) to
231234let you know that it's active. From now on, any package that you install
232235using ``pip `` will be placed in the ``venv `` folder, isolated from the global
233- Python installation.
236+ Python installation.
234237
235238Install packages as usual:
236239
@@ -259,9 +262,9 @@ the current state of the environment packages. To do this, run
259262
260263 This will create a :file: `requirements.txt ` file, which contains a simple
261264list of all the packages in the current environment, and their respective
262- versions. Later, when a different developer (or you, if you need to re-
263- create the environment) can install the same packages, with the same
264- versions by running
265+ versions. Later it will be easier for a different developer (or you, if you
266+ need to re- create the environment) to install the same packages using the
267+ same versions:
265268
266269.. code-block :: console
267270
@@ -291,8 +294,8 @@ Put this into your :file:`~/.bash_profile` (Linux/Mac) file:
291294 $ export VIRTUALENVWRAPPER_VIRTUALENV_ARGS='--no-site-packages'
292295
293296 This will prevent your virtualenvs from relying on your (global) site packages
294- directory, so that they are completely separate..
295- [note : This is the default behavior for ``virtualenv `` 1.7 and later]
297+ directory, so that they are completely separate.
298+ [Note : This is the default behavior for ``virtualenv `` 1.7 and later]
296299
297300Other Tools
298301:::::::::::
0 commit comments