Show message about %paste magic on an IndentationError from code in the prompt.
Only when we parse code from the prompt, so it won't show up if there's an IndentationError from code that's imported.
Sort of closes #572.
Show message about %paste magic on an IndentationError from code in t…
Only tell the user about %paste in the terminal shell.
Make showindentationerror a separate function, so it can have its own…
This is a very cryptic message to me:
unexpected indent (<ipython-input-18-6ff15c9a0bad>, line 1)
If you want to paste code into IPython, try the %paste magic function.
The documentation also does not contain information about any %paste magic function.
I would prefer the old behavior back, where pasting indented code just worked.
%paste is only defined for the terminal frontend, which doesn't appear to be listed in the API docs (I'm not sure why). But there's not much to document - just enter %paste.
It's quite tricky to handle indented code correctly at the terminal, where we're trying to do autoindentation at the same time. Pasting at the Qt console works perfectly. I'd like to see it work better in the terminal, but it's probably not high priority for any of the developers at the moment.
+1 for fixing this. Qt console doesn't build properly on my box and this feels like a pretty big regression to me.