[Urwid] TreeWidget/TreeWalker class
robla at robla.net
Sat Feb 13 14:14:40 EST 2010
I spent the past week hammering away at TreeWidget/TreeWalker, and I have
something now that I'm pretty confident is a general purpose widget. In
addition to rewriting my own app to use it, I rewrote urwid's browse.py
sample app to take advantage of it, which other than a couple minor cosmetic
changes, performs identically to the version that ships with urwid. Code is
I didn't entirely eliminate the globals in browse.py, but they're no longer
central to the operation of the widget, and it wouldn't be that much more
work to get rid of them entirely.
Lemme know what you think.
On Mon, Feb 8, 2010 at 10:57 AM, Rob Lanphier <robla at robla.net> wrote:
> In the process of writing my form building tool, I found myself wanting a
> TreeWidget class. Seeing that browse.py included with urwid was pretty
> close to what I was looking for, I decided to take a crack at teasing out
> the generic bits from the overall code, resulting in the attached files.
> Since I haven't done anything more than make sure that browse.py still
> works after the class extraction, I'll probably have more work to do to the
> base classes. Here's where I'll be doing that work:
> I hope this is useful. Let me know if you have any particular guidance on
> direction for this.
> p.s. I'll explain more about what I'm planning to do with this in a
> separate email.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Urwid