[IPython-dev] IPython 0.7.1.rc1 is ready

Ville Vainio vivainio at gmail.com
Mon Jan 23 05:39:17 EST 2006


On 1/23/06, Arnd Baecker <arnd.baecker at web.de> wrote:

> Hmm, is this the one where pasting multiple lines of code,
> including single empty lines, should work?
>
> For example, pasting the following does not work for me:
>
> ##################################
> def f(x):
>     print x
>
>     print x+1
> ##################################
>
> In [2]: def f(x):
>    ...:     print x
>    ...:
>
> In [3]:     print x+1

I admit to not have worked on this feature (it's on fernando's turf)
but it seems so complicated that I'm starting to think we should add a
magic %paste that would read a bunch of text and just terminate on
some special sentinel, e.g. "-- "

Here's a hypothetical example:

ipython> %paste
Ready to paste code! Terminate the section with "--"
if 1:
  print "hello world"


 print "blah"

--
.. Ready, evaluating:
hello world
blah

--
Ville Vainio - http://tinyurl.com/2prnb
http://vainio.blogspot.com




More information about the IPython-dev mailing list