[Urwid] detecting when an edit box has changed
Ian Ward
ian at excess.org
Sat Jul 15 12:50:45 EDT 2006
Eric S. Johansson wrote:
> What do you mean by hooking a function in Python? I'm familiar with
> lots of techniques using pointers to functions in a variety of different
> languages. so is there a function I overload or pass into the constructor?
In python you the easiest way is to override the function in a subclass. eg:
class FancyEdit(urwid.Edit):
def set_edit_text(self, text):
# do things
urwid.Edit.set_edit_text(self, text)
Ian
More information about the Urwid
mailing list