[Urwid] just not getting navigation.
Eric S. Johansson
esj at harvee.org
Sun Jul 2 20:45:01 EDT 2006
Ian Ward wrote:
>
> well, the python way of removing elements from a list is:
>
> del mylist[5:9] # delete elements 5, 6, 7, 8
>
> and the python way to insert elements into a list:
>
> mylist[5:5] = [widget1, widget2] # insert 2 elements at position 5
my, my what will those language designers think of next. ;-)
>
> Those should work fine. If you want to get really fancy you can write
> your own list walker class that can dynamically choose ListBox content
> as it is being displayed. Many of the included example programs
> demonstrate this.
given (from your example)
self.items = [ location, urwid.Divider(),
look_row, exits_row ]
self.listbox = urwid.ListBox( self.items )
if I simply self.items.append(x), I should get one additional row which
I can then delete at some other time? in fact, it should be possible to
completely replace all of the elements in the items array if I should
see fit.
okay, I'll try that.
---eric
>
>
> _______________________________________________
> Urwid mailing list
> Urwid at lists.excess.org
> http://lists.excess.org/mailman/listinfo/urwid
More information about the Urwid
mailing list