Emacs Python completion

The purpose of this package is to support Python code completion and to make easier to use Python documentation using Emacs.

There are available following features:

  1. code completion hitting <TAB> (or <C-M-i>) key:

    e.g.:

    time.cl<TAB> -> time.clock
    
    time.<TAB> -> list of possible choices
    
  2. description of the element (function/module/class/keyword) at the point hitting <F1> key

  3. hitting '(' and ',' shows funtion signature

    e.g.:

    time.strftime( -> strftime(format[, tuple]) -> string
    
  4. <F2> getting signature of a given function name

  5. <F3> getting description of a given element name

Installation

  1. Install Pymacs
  2. Copy files python-mode.el and pycomplete.el on your Emacs load_path (e.g. /usr/share/emacs/site-lisp).
  3. Copy file pycomplete.py on your PYTHONPATH (e.g. /usr/lib/python2.5/site-packages)
  4. Copy the following settings to your .emacs file
(require 'pycomplete)
(setq auto-mode-alist (cons '("\\.py$" . python-mode) auto-mode-alist))
(autoload 'python-mode "python-mode" "Python editing mode." t)
(autoload 'pymacs-load "pymacs" nil t)
(autoload 'pymacs-eval "pymacs" nil t)
(autoload 'pymacs-apply "pymacs")
(autoload 'pymacs-call "pymacs")
(setq interpreter-mode-alist(cons '("python" . python-mode)
                             interpreter-mode-alist))