[IPython-dev] Fwd: [Matplotlib-users] Improved dashing for black and white plots?

Fernando Perez fperez.net at gmail.com
Thu Jul 13 12:20:19 EDT 2006

On 7/13/06, Ville Vainio <vivainio at gmail.com> wrote:
> > BTW, here is a version of history as a ipipe table:
> I think we should convert most of the magics to return a table if they
> currently dump tabular/linear data to screen.

Sounds good.  I know you guys have put much more work/interest than me
in the whole shell-type usage, and this would be a very nice way of
really making ipython a really interesting tool on that front.

My only concern here is lazy evaluation: in a shell,

ls * | grep foo

produces results from grep as early as they get created by ls.  A
simple implementation in python will most likely lead to a greedy
design which would block.  It can be done with generators, though.
You just need to find a mechanism such that the generators, when
chained for processing, operate in lazy mode, but to consume them in
full if they are just going to be printed as output.  This can be
achieved by ensuring that their __repr__ (invoked at display time)
consumes them completely before rendering them.

There are a few subtleties, but I think this can be both a fun and
very useful development.  I won't get dragged into it, though :)



More information about the IPython-dev mailing list