[IPython-dev] Re: Changes to Notebook Format

Hans Meine hans_meine at gmx.net
Mon Aug 1 12:34:33 EDT 2005


On Wednesday 27 July 2005 07:44, Fernando Perez wrote:
> Here's an even worse example:
>
> In [3]: for i in range(3):
>     ...:     print 'passing...'
>     ...:     i
>     ...:
> [...] I think the example above should simply print
> 'passing...' three times, and NOT generate an Out[] cell at all.

Right, think so too.

> > As for having stdout cells interleaved with other types of output cells,
> > I think that's going to be pretty hard. You'd have to collect the output
> > from each statement separately. I'm of the opinion that you should just
> > collect one each of stdout and stderr.
>
> Yup.

I disagree.  In my opinion, I want to preserve the order of interleaving 
stdout/stderr outputs.  E.g.

  for i in range(10):
     myFunc(filenames[i])

Now let myFunc output either "File processed fine." to stdout or "Error 
processing file" to stderr.  (Admitted, the messages suck. ;-) )

I would like to know exactly which i's failed.

Greetings,
  Hans




More information about the IPython-dev mailing list