[Urwid] Twisted version of generic_main_loop

Walter Mundt walter at okcupid.com
Wed Aug 27 13:24:13 EDT 2008

Ian Ward wrote:
> It's a good start.  I was hoping this could be done with
> get_input_descriptors[1] and get_input_nonblocking[2] instead of using
> threads.
> [1] http://excess.org/urwid/reference.html#Screen-get_input_descriptors
> [2] http://excess.org/urwid/reference.html#Screen-get_input_nonblocking

Done.  Also, this version adds a handle_reactor parameter.  If False, 
rather than looping the function simply returns a twisted Deferred that 
will trigger when the UI shuts down, whether via an ExitMainLoop call 
(callback True) or a different unhandled exception in one of the 
handlers passed in (errback).


-------------- next part --------------
A non-text attachment was scrubbed...
Name: twisted_main_loop.py
Type: text/x-python
Size: 4250 bytes
Desc: not available
Url : http://lists.excess.org/pipermail/urwid/attachments/20080827/b749b1a9/attachment.py 

More information about the Urwid mailing list