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.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…