IPython in Emacs

rusi rustompmody at gmail.com
Fri Apr 26 00:06:03 EDT 2013


On Apr 26, 3:18 am, Seb <splu... at gmail.com> wrote:
>
> I don't understand what you're asking.  I evaluate the script buffer
> with `python-shell-send-buffer' and start IPython with `run-python'.


There are two emacs python modes -- one which comes builtin with emacs
-- python.el, one which (used to?) come with python -- python-mode.el.

My impression is that most pythonistas preferred the python-mode
earlier. Not so sure now.
You can get it from https://launchpad.net/python-mode/

Heres a minimal setup for python-mode +ipython (everything's probably
not working)

(add-to-list 'load-path "~/.emacs.d/downloads/python-mode")  ;; Or
whatever is your path for python-mode.el
(autoload 'python-mode "python-mode" "Python Mode." t)
(add-to-list 'auto-mode-alist '("\\.py\\'" . python-mode))
(add-to-list 'interpreter-mode-alist '("python" . python-mode))

;; A first cut at replicating your settings of ipython for python-mode
(setq py-python-command "ipython"  ; python-shell-interpreter
      py-python-command-args '("")    ; python-shell-interpreter-args
					; Should it be -i?
      py-shell-input-prompt-1-regexp "In \\[[0-9]+\\]: "
      ; Other variables dont exist or cant find
      ; Not really explored ipython.el
)





More information about the Python-list mailing list