Ignore leading '>>>' and ellipsis?

Javier Collado javier.collado at gmail.com
Thu Jan 14 12:24:39 EST 2010


Hello,

I think that's exactly what the cpaste magic function does. Type
'cpaste?' in your IPython session for more information.

Best regards,
    Javier

2010/1/14 Reckoner <reckoner at gmail.com>:
>
> Hi,
>
> I am studying some examples in a tutorial where there are a lot of
> leading >>> characters and ellipsis in the text. This makes it hard to
> cut and paste into the IPython interpreter since it doesn't like these
> strings.
>
> Is there another interpreter I could use that will appropriately
> ignore and interpret these leading terms?
>
> For example, I cannot paste the following directly into the
> interpreter:
>
>>>> d = dict(x.__array_interface__)
>>>> d['shape'] = (3, 2, 5)
>>>> d['strides'] = (20, 20, 4)
>
>>>> class Arr:
> ...     __array_interface__ = d
> ...     base = x
> --
> http://mail.python.org/mailman/listinfo/python-list
>



More information about the Python-list mailing list