[Urwid] Using urwid for an ipython frontend

Ian Ward ian at excess.org
Sun Mar 21 16:05:45 EDT 2010


Wendell Smith wrote:
> Hello,
> 
> I am preparing to write a curses-based frontend for ipython, and am 
> considering using urwid. I have only just started looking at it, but it 
> looks well-written, and has exactly the kind of widgets I am looking for.
> 
> However, as far as I can tell, urwid does not yet support python 3. The 
> main developers at ipython are preparing to change over to python 3, and 
> a curses-based frontend will need to support python 3. Is urwid planning 
> to support python 3 in the near future? If so, how soon?

I believe Marien Zwart was doing some cleanup related to supporting 
Python 3.  There was some rumor of a version that did at least partially 
work, but I haven't seen it.  One difficulty is that uses strings for 
text already in the target encoding, and unicode for text that Urwid 
will encode for the user.

> One more thing:
> I have been playing with urwid, and have noticed that when one uses flow 
> widgets when one should use box widgets (or vice versa), the error 
> messages seem to be remarkably cryptic and unhelpful - "ValueError: too 
> many values to unpack", "AttributeError: 'Filler' object has no 
> attribute 'rows'", etc. Is there a way to easily debug and see exactly 
> which widget combination is causing the trouble?

Not yet. I've done the first part by adding knowledge of the sizing 
methods supported by a widget, once the container widgets are refactored 
to use more common code they will be able to give better error messages 
when used with the wrong type of widget (and they can do it when the 
widget is added instead of later when keypress or render gets called).

Ian



More information about the Urwid mailing list