[Urwid] TreeWidget/TreeWalker class
robla at robla.net
Wed Mar 24 03:06:07 EDT 2010
As you probably remember, a while back, I published this:
...which resulted in the thread I've quoted below.
Since that time, I've improved the code, and wrote the simple sample app I
alluded to (treesample.py at the url above). I'm pretty happy how the
sample turned out...it's 156 lines of code, of which about 120 is pretty
obviously just scaffolding.
Let me know if/when you'd like me to prepare it for inclusion into urwid
mainline. I'm happy to redo the copyright notice however you'd like to see
it (including assigning copyright over to you...I'd just like some level of
authorship credit), and I'm happy to prepare it as a patch to urwid instead
of in its current standalone form, as well as doing whatever extra tweaking
you'd need to feel comfortable taking it upstream.
On Sun, Feb 14, 2010 at 10:09 PM, Rob Lanphier <robla at robla.net> wrote:
> On Sun, Feb 14, 2010 at 5:32 AM, Ian Ward <ian at excess.org> wrote:
>> Rob Lanphier wrote:
>> > 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 here:
>> > http://bitbucket.org/robla/urwid-treetools/
>> I see this is based on 0.9.8, would you update the code for 0.9.9
>> (_get_w and _set_w instead of get_w and set_w, using MainLoop)
> Okee doke. I just pushed a version which I think syncs all of the
> important changes in browse.py made since 0.9.8.
>> Also it
>> would be nice to see how this modified code is used by another app to
>> see the reasoning behind your changes.
> I just pushed a new version of my app here which uses this code:
> ...but it's still in pretty rough shape, so it may not make the best
> example. If I get the chance, I'll write a small sample app that
> demonstrates a simple use case.
>> It's quite a bit of extra code to include with the browse.py example,
>> but it should be possible to incorporate some of the changes back. Or
>> with the changes above I could include your code in the urwid-contrib
> Wherever works for you is fine by me. I think it'll be pretty useful for
> folks, but I can understand not wanting to take on the maintenance burden of
> an unproven widget.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Urwid