[Urwid] [PATCH] Pile updating methods
Ian Ward
ian at excess.org
Sun Jul 23 18:42:44 EDT 2006
Sébastien Pierre wrote:
> Hi,
>
> As I needed to update a Pile widget according to user interaction, I
> implemented some additional methods in the Pile class. Here is the
> small patch that implements "add_widget", "remove_widget" and
> "remove_widgets", which were sufficient for my needs.
>
> Is it consistent with the current URWID design ?
Thank you for the patch. We need something like this in the Pile,
Columns and ListBox widgets.
I might choose to implement __getitem__, __setitem__, __deleteitem__,
... methods instead of defining new methods. That way the widgets can
behave like regular python sequences.
see:
http://docs.python.org/ref/sequence-types.html
Ian
More information about the Urwid
mailing list