I want to copy already indented Python code / whole functions and classes into IPython. Everytime I try the indentation is screwed up and I get following error message:
IndentationError: unindent does not match any outer indentation level (<ipython-input-23-354f8c8be51b>, line 12)
If you want to paste code into IPython, try the %paste and %cpaste magic functions.
You can't copy to IPython directly. This are the steps:
%paste
into IPython