Really annoying problem in ipython prompt in emacs:
In [128]: if 1==1:
.....: print "yes"
.....: else:
.....: print "no"
.....:
IndentationError: unindent does not match any outer indentation level
It looks perfectly aligned to me, not sure what trigger the error. No such problem when I do this in terminal.
You might try toggling autoindent with
%autoindentsince I think that has caused the problem for me before.
You can change this permanently using ipython’s customization. After the proper imports (see the link) the following should work in ipy_user_conf.py: