[IPython-User] Problem with IPython / Emacs

Eric Tanter etanter@dcc.uchile...
Sat Aug 11 17:37:10 CDT 2012


I'm trying out ipython with emacs, but can't get it to work properly.

My setting is:
Mac OS X Lion
Emacs 23.3
Python 2.7.1 (r271:86832, Jul 31 2011, 19:30:53) 
IPython 0.13
python-mode 6.0.10

My .emacs has:
(require 'python-mode)
(add-to-list 'auto-mode-alist '("\\.py\\'" . python-mode))

If I turn on ipython
(setq py-shell-name "ipython")

then sending a buffer to ipython (with C-c C-c) invariably results in an indentation error (the same buffer gives no error with the standard python interpreter)


In [10]: ---------------------------------------------------------------------------
IndentationError                          Traceback (most recent call last)
<ipython-input-10-70ed7a20043c> in <module>()
----> 1 execfile(r'/var/folders/rm/pgg04zyd73jb2b4jm0gqd1qc0000gp/T//ipython-20580gaK.py') # PYTHON-MODE

IndentationError: expected an indented block (ipython-20580gaK.py, line 4)

This error occurs as soon as I have more than 1 line in the buffer.
class Test():

I have gone through several related thread on the web, but without success. Any help is appreciated!

-- Éric

More information about the IPython-User mailing list