Paste Multi-line Snippets into IPython

RandomCPlusPlus picture RandomCPlusPlus · Apr 19, 2012 · Viewed 7.2k times · Source

I used IPython in the past and I used to be able to copy and paste multi-line commands, e.g., a for loop in IPython. Working in my new PC after installing Python(x,y) 2.7.2.1, I can paste multi-line snippets by using Right-click → Edit → Paste but not by using CTRL+P, as I used to do. When using CTRL+P only the first line for the multi-line snippet gets pasted. Can somebody help please? I looked in the settings and documentation to no avail.

Answer

A. Jesse Jiryu Davis picture A. Jesse Jiryu Davis · May 9, 2012

Type %paste into the IPython command line.