def create_edit(self, label, text, fn): w = urwid.Edit(label, text) urwid.connect_signal(w, 'change', fn) fn(w, text) w = urwid.AttrWrap(w, 'edit') return w