thankyou Ian!
On Tue, Sep 28, 2010 at 8:36 AM, Ian Ward <[email protected]> wrote: > Mag Gam wrote on 2010-09-28 06:41: >> I run my program like this, cat foo | python code.py. How can I keep >> my stdin without urwid exiting prematurely? >> > > So, you want urwid to connect to the controlling tty instead of using stdin? > > If so you could do something like: > > old_stdin = sys.stdin > sys.stdin = .. # the file object for Urwid input > screen = urwid.raw_display.Screen() > sys.stdin = old_stdin > loop = urwid.MainLoop(.., screen=screen) > > Then urwid won't pay any attention to stdin. > > > _______________________________________________ > Urwid mailing list > [email protected] > http://lists.excess.org/mailman/listinfo/urwid > _______________________________________________ Urwid mailing list [email protected] http://lists.excess.org/mailman/listinfo/urwid
