The question's title tells it; I'm reading a book and I'd like to try the code on the fly using IPython but all the code is structured like this:
right = DataFrame({'key1': ['foo', 'foo', 'bar', 'bar'],
....: 'key2': ['one', 'one', 'one', 'two'],
....: 'rval': [4, 5, 6, 7]})
I'd like to copy it directly from the book inside the terminal but even using %paste I receive an Invalid Syntax error. I could use %cpaste but for longer inputs it is kind of frustrating.
Thanks for your help
..., but not ipython's....:. So changing the prompts to...would work. But that's probably not an option for you.