Emacs python-mode

peixe picture peixe · May 18, 2012 · Viewed 6.9k times · Source

I'm trying to configure Emacs23.2 to work with python2.7.3, using the package python-mode.el-6.0.7

After adding to my .emacs file these LISP lines, as indicated in the INSTALL instructions,...

(add-to-list 'load-path "PATH/TO/PYTHON-MODE/") 
(setq py-install-directory "PATH/TO/PYTHON-MODE/")
(require 'python-mode)

... I open a file foo.py and until here its all OK: python is recognised, the syntax is highlighted and emacs is working well.

But I got the suspect I'm missing something or doing something wrong... Mainly, because in the python-mode package there is some more stuff to use with python&emacs, like pycomplete, pymacs, etc... which looks like they are not operating together when I open emacs & python.

Does anyone know how to configure this package in a proper way, to get everything together working right?

Any (personal) suggestion is welcome, as I am not a pro with emacs...!

Answer

phils picture phils · May 18, 2012

(I imagine someone will provide a better answer, but...)

The documentation for Python support on the EmacsWiki used to be pretty messy, in part because there were two different major modes to choose from, and information for each was all mixed into the same page.

It's clearly been cleaned up a great deal since I first encountered it, so hopefully it's not too confusing, and you'll find what you need at one of the following: