13

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 on my new PC after installing Python(x,y) 2.7.2.1, I can paste multi-line snippets by using right-click → EditPaste, 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. How can I fix this?

I looked in the settings and documentation to no avail.

0

2 Answers 2

25

Type %paste into the IPython command line.

Sign up to request clarification or add additional context in comments.

Comments

18

You can use %cpaste with IPython shell (which is also what is used by Django's management shell). If you want to learn more of the features, type %quickref.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.