ipython/ipython — pull request #3390 by takluyver (2013-05-31 23:34:15+00:00)
Title: Fix %paste with blank lines

Closes gh-3246

This gets things working again. I'm still having a think about whether the remaining API details (stripping email quotes) can be moved into the core input transformers, but this fixes the problem.

This means that automagics won't work in pasted code. I think that's a good idea, because trying to apply automagics widely leads to bizarre and confusing bugs like #3334. Most code that people run using %paste is probably pure-Python code anyway.

Also, if you use `%paste foo` to transfer the clipboard contents to a variable, there's no obvious reason to expect that the content is Python code, so it now stores the raw string instead of trying to clean it up as code.