[Urwid] Best way to update a Frame "footer"

Ian Ward ian at excess.org
Thu Jul 13 21:35:58 EDT 2006


Sébastien Pierre wrote:
> The UI I am working on contains focusable elements (Edit, CheckBox)
> that I would like to report information in the Frame footer when
> focused. The problem I encounter is that there is a noticeable delay
> between the pressing of a key and the appearance of the footer on the
> screen. As I am doing everything locally, I guess this should not
> happen.
...
> 
> What could I do to make this more reactive ?
> 
>  -- Sébastien

Put your "onFocus" code after the keyboard input handling.

Right now you're getting a delay because the text in the footer is set 
*after* drawing the result of a keypress, so your footer text won't 
appear until the input times out and your program goes through the main 
loop again.

-Ian




More information about the Urwid mailing list