Code navigation, documentation lookup and completion for Python.
- emacs 24.3
- python 2.6, 2.7, 3.2 or 3.3
- context-sensitive code completion for Python
- jump to definition
- find references
- view documentation
- virtualenv
All you need is install the package from Melpa.
M-x package-install RET anaconda-mode RET
By default anaconda-mode
starts its HTTP server on port 24970
for
interaction with Python process. You may want to close this port for
incoming network connections. This server will start automatically
when you call any anaconda command like reference search or
documentation lookup. To start anaconda-mode
automatically in all
python buffers add following to your configuration.
(add-hook 'python-mode-hook 'anaconda-mode)
Anaconda mode detect active virtual environment through value of
python-shell-virtualenv-path
variable defined in python.el
library. When you set it to actual virtualenv path next anaconda-mode
command you call will restart its python process in proper environment
before performing this call. This allow anaconda processing
virtualenv site-packages with minimum number of actions from your
side. I strongly recommended you to use package like
pyenv-mode or similar
package to hold python-shell-virtualenv-path
in actual state.
Anaconda doesn't has internal contrib interface yet. But any way you can use additionally packages with manual setup. To turn on any of its add corresponding code snippet to your configuration.
ElDoc documentation lookup with anaconda-mode
.
(add-hook 'python-mode-hook 'anaconda-eldoc)
Anaconda backend for company-mode.
(add-to-list 'company-backends 'company-anaconda)
Are very welcome. But any significant change has to be accompanied with tests, both for Emacs Lisp and Python code. To run the test suite, call:
tox
- Dmitry Gutov @dgutov
- Bo Lin @sadboy
- Vasilij Schneidermann @wasamasa