[Urwid] urwid and twisted reactor

Ilpo Nyyssönen iny+dev at iki.fi
Sat Jul 1 02:22:51 EDT 2006


Ian Ward <ian at excess.org> writes:

> The only conflict between Urwid and twisted right now is that the
> get_input() function relies on being able to read input itself and
> delay for more input when it receives a partial escape sequence from
> the user.

I am using urwid with twisted and I haven't run into problems with
that yet, but yes, that sounds like an issue.

I basically run it like this:

tui = urwid_display.Screen()
screen = Screen(tui)
reactor.addReader(screen)
tui.run_wrapper(reactor.run)

Here Screen is a fake fd registered as a reader to read the standard
input.

Later initialization can be done by using
reactor.callWhenRunning(...).

-- 
Ilpo Nyyssönen # biny # /* :-) */




More information about the Urwid mailing list