@@ -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,21 +61,28 @@ 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
80+ SuperTab
81+ ^^^^^^^^
82+
83+ SuperTab _ is a small Vim plugin that makes code completion more convenient by
84+ using ``<Tab> `` key or any other customized keys.
85+
7986.. _indent : http://www.vim.org/scripts/script.php?script_id=974
8087.. _syntax : http://www.vim.org/scripts/script.php?script_id=790
8188.. _Pyflakes : http://pypi.python.org/pypi/pyflakes/
@@ -84,15 +91,14 @@ And more.
8491.. _vim-pep8 : https://github.com/nvie/vim-pep8
8592.. _syntastic : https://github.com/scrooloose/syntastic
8693.. _Python-mode : https://github.com/klen/python-mode
87-
88- .. todo :: add supertab notes
94+ .. _SuperTab : http://www.vim.org/scripts/script.php?script_id=1643
8995
9096Emacs
9197-----
9298
93- Emacs is a powerful text editor. It's fully programmable (lisp), but
94- it can be some work to wire up correctly. A good start if you're
95- 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.
96102
971031. Emacs itself comes with a Python mode.
981042. Python ships with an alternate version:
@@ -121,6 +127,17 @@ Sublime Text has excellent support for editing Python code and uses Python for
121127its plugin API. It also has a diverse variety of plugins, `some of which <https://github.com/SublimeLinter/SublimeLinter >`_
122128allow for in-editor PEP8 checking and code "linting".
123129
130+ Atom
131+ ----
132+
133+ `Atom <https://atom.io/ >`_ is a hackable text editor for the 21st century,
134+ built on atom-shell, and based on everything we love about our favorite editors.
135+
136+ Atom is web native (HTML, CSS, JS), focusing on modular design and easy plugin development.
137+ It comes with native package control and plethora of packages. Recommended for Python
138+ development is `Linter <https://github.com/AtomLinter/Linter >`_ combined with
139+ `linter-flake8 <https://github.com/AtomLinter/linter-flake8 >`_.
140+
124141
125142IDEs
126143::::
@@ -131,6 +148,8 @@ PyCharm / IntelliJ IDEA
131148`PyCharm <http://www.jetbrains.com/pycharm/ >`_ is developed by JetBrains, also
132149known for IntelliJ IDEA. Both share the same code base and most of PyCharm's
133150features can be brought to IntelliJ with the free `Python Plug-In <http://plugins.intellij.net/plugin/?id=631 >`_.
151+ There are two versions of PyCharm: Professional Edition (Free 30-day trial)
152+ and Community Edition(Apache 2.0 License) with fewer features.
134153
135154
136155Eclipse
@@ -142,27 +161,30 @@ The most popular Eclipse plugin for Python development is Aptana's
142161
143162Komodo IDE
144163----------
164+
145165`Komodo IDE <http://www.activestate.com/komodo-ide >`_ is developed by
146166ActiveState and is a commercial IDE for Windows, Mac, and Linux.
167+ `KomodoEdit <https://github.com/Komodo/KomodoEdit >`_ is the open source
168+ alternative.
147169
148170
149171Spyder
150172------
151173
152174`Spyder <http://code.google.com/p/spyderlib/ >`_ is an IDE specifically geared
153175toward working with scientific Python libraries (namely `Scipy <http://www.scipy.org/ >`_).
154- It includes integration with pyflakes _, `pylint <http://www.logilab.org/857 >`_,
176+ It includes integration with pyflakes _, `pylint <http://www.logilab.org/857 >`_
155177and `rope <http://rope.sourceforge.net/ >`_.
156178
157179Spyder is open-source (free), offers code completion, syntax highlighting,
158- class and function browser, and object inspection.
180+ a class and function browser, and object inspection.
159181
160182
161183WingIDE
162184-------
163185
164186`WingIDE <http://wingware.com/ >`_ is a Python specific IDE. It runs on Linux,
165- Windows, and Mac (as an X11 application, which frustrates some Mac users).
187+ Windows and Mac (as an X11 application, which frustrates some Mac users).
166188
167189WingIDE offers code completion, syntax highlighting, source browser, graphical
168190debugger and support for version control systems.
@@ -179,116 +201,35 @@ systems. Installers for these platforms can be downloaded from the website.
179201NINJA-IDE is open-source software (GPLv3 licence) and is developed in Python and
180202Qt. The source files can be downloaded from `GitHub <https://github.com/ninja-ide >`_.
181203
182- Interpreter Tools
183- :::::::::::::::::
184-
185-
186- virtualenv
187- ----------
188-
189- Virtualenv is a tool to keep the dependencies required by different projects
190- in separate places, by creating virtual Python environments for them.
191- It solves the "Project X depends on version 1.x but, Project Y needs 4.x"
192- dilemma, and keeps your global site-packages directory clean and manageable.
193-
194- `virtualenv <http://www.virtualenv.org/en/latest/index.html >`_ creates
195- a folder which contains all the necessary executables to contain the
196- packages that a Python project would need. An example workflow is given.
197-
198- Install virtualenv:
199-
200- .. code-block :: console
201-
202- $ pip install virtualenv
203-
204204
205- Create a virtual environment for a project:
206-
207- .. code-block :: console
208-
209- $ cd my_project
210- $ virtualenv venv
211-
212- ``virtualenv venv `` will create a folder in the current directory
213- which will contain the Python executable files, and a copy of the ``pip ``
214- library which you can use to install other packages. The name of the
215- virtual environment (in this case, it was ``venv ``) can be anything;
216- omitting the name will place the files in the current directory instead.
217-
218- To start using the virtual environment, run:
219-
220- .. code-block :: console
205+ Eric (The Eric Python IDE)
206+ --------------------------
221207
222- $ source venv/bin/activate
208+ `Eric <http://eric-ide.python-projects.org/ >`_ is a full featured Python IDE
209+ offering sourcecode autocompletion, syntax highlighting, support for version
210+ control systems, python 3 support, integrated web browser, python shell,
211+ integrated debugger and a flexible plug-in system. Written in python, it is
212+ based on the Qt gui toolkit, integrating the Scintilla editor control. Eric
213+ is an open-source software project (GPLv3 licence) with more than ten years of active
214+ development.
223215
224216
225- The name of the current virtual environment will now appear on the left
226- of the prompt (e.g. ``(venv)Your-Computer:your_project UserName$ ``) to
227- let you know that it's active. From now on, any package that you install
228- using ``pip `` will be placed in the ``venv `` folder, isolated from the global
229- Python installation.
230-
231- Install packages as usual:
232-
233- .. code-block :: console
234-
235- $ pip install requests
236-
237- To stop using an environment, simply type ``deactivate ``. To remove the
238- environment, just remove the directory it was installed into. (In this
239- case, it would be ``rm -rf venv ``.)
240-
241- Other Notes
242- ^^^^^^^^^^^
243-
244- Running ``virtualenv `` with the option :option: `--no-site-packages ` will not
245- include the packages that are installed globally. This can be useful
246- for keeping the package list clean in case it needs to be accessed later.
247- [This is the default behavior for ``virtualenv `` 1.7 and later.]
248-
249- In order to keep your environment consistent, it's a good idea to "freeze"
250- the current state of the environment packages. To do this, run
251-
252- .. code-block :: console
253-
254- $ pip freeze > requirements.txt
255-
256- This will create a :file: `requirements.txt ` file, which contains a simple
257- list of all the packages in the current environment, and their respective
258- versions. Later, when a different developer (or you, if you need to re-
259- create the environment) can install the same packages, with the same
260- versions by running
261-
262- .. code-block :: console
263-
264- $ pip install -r requirements.txt
265-
266- This can help ensure consistency across installations, across deployments,
267- and across developers.
268-
269- Lastly, remember to exclude the virtual environment folder from source
270- control by adding it to the ignore list.
271-
272- virtualenvwrapper
273- -----------------
274-
275- `Virtualenvwrapper <http://pypi.python.org/pypi/virtualenvwrapper >`_ makes
276- virtualenv a pleasure to use by wrapping the command line API with a nicer CLI.
277-
278- .. code-block :: console
279-
280- $ pip install virtualenvwrapper
217+ Interpreter Tools
218+ :::::::::::::::::
281219
282220
283- Put this into your :file: `~/.bash_profile ` (Linux/Mac) file:
221+ Virtual Environments
222+ --------------------
284223
285- .. code-block :: console
224+ A Virtual Environment is a tool to keep the dependencies required by different projects
225+ in separate places, by creating virtual Python environments for them. It solves the
226+ "Project X depends on version 1.x but, Project Y needs 4.x" dilemma, and keeps
227+ your global site-packages directory clean and manageable.
286228
287- $ export VIRTUALENVWRAPPER_VIRTUALENV_ARGS='--no-site-packages'
229+ For example, you can work on a project which requires Django 1.3 while also
230+ maintaining a project which requires Django 1.0.
288231
289- This will prevent your virtualenvs from relying on your (global) site packages
290- directory, so that they are completely separate..
291- [note: This is the default behavior for ``virtualenv `` 1.7 and later]
232+ To start using and see more information: `Virtual Environments <http://github.com/kennethreitz/python-guide/blob/master/docs/dev/virtualenvs.rst >`_ docs.
292233
293234Other Tools
294235:::::::::::
@@ -346,4 +287,3 @@ Python interpreter for Unix-like operating systems. It has the following feature
346287.. code-block :: console
347288
348289 $ pip install bpython
349-
0 commit comments