[IPython-dev] Re: Some notebook thoughts

Hans Meine hans_meine at gmx.net
Tue Jul 5 06:26:45 CDT 2005


On Monday 04 July 2005 23:19, Robert Kern wrote:
> It's the nesting of those cells within rich text that kills the idea of
> implementing it all on a QCanvas or similar object. We *don't* want to
> rewrite a rich text editor widget.
Right.  I also think rich-text widgets are more appropriate than general 
canvas widgets.

> One idea is to simply have a linear 
> arrangement of cells: Rich Text, In, In, Out, In, Rich Text, In, Out,
> etc. each cell getting it's own widget layed out in, e.g. a
> wx.ScrolledWindow. That model fails, however, when (In , In, Out, In)
> are actually supposed to be three levels down: [...]

Good point.  I want to add another little one; we fiddled around with several 
setups for a (Qt-based) python shell, and one problem was indentation. The 
terminal's main author really wants the prompts to be left-aligned, but 
output to be indented, so that you can immediately recognize the beginnings 
of paragraphs.  Let me sketch it:

>>> a = [1,2,3]
>>> print a
    [1, 2, 3]
>>> foo
    Traceback (most recent call last):
      File "<stdin>", line 1, in ?
    NameError: name 'foo' is not defined
>>> for i in range(3):
...     b = i
...
>>>

That'd be another user story for a GUI (anybody cares to add it for me?).  
Actually I don't care much about it, and there will probably be other means 
to quickly differentiate between the different cells, but anyhow.

Oh, and another one:

One might want to have the output colored differently depending on whether it 
came through stdout or stderr; e.g. red for errors/warnings.

Ciao, /  /
     /--/
    /  / ANS




More information about the IPython-dev mailing list