W. Cole Davis wrote on 2011-04-05 17:24: > Hi all, been playing with urwid for a few days and from what I see it > will really suit my needs for a terminal interface to a prototype > project I'm working on. We are writing an application using mpi4py to > distribute some significant calculations to a cluster. The only node > displaying the interface is the head-node and this is already setup and > working. The problem is that when executing under mpi it seems to use a > non-default descriptor as it reroutes piped communications to a separate > buffer on the head-node (from all children too) and this screws up > urwid. I've been over and over the reference and examples I could find > but none seem to show anyone dealing with this type of issue. > > I looked at the source for the raw_display class and it assumes the fd > is '0' for default sys.stdin I'm guessing? Is there a way that I can > specify the terminal/buffer using core urwid functionality? It seemed > like, since when using MainLoop you can set a specific "Screen" object > but I cannot figure out how to create a custom one. > > Any help would be much appreciated. The actual (and vague) error I'm > seeing is: > > File > "/usr/lib64/python2.4/site-packages/urwid-0.9.9.1-py2.4-linux-x86_64.egg/urwid/main_loop.py", > line 170, in run > > self.screen.run_wrapper(self._run) > > File > "/usr/lib64/python2.4/site-packages/urwid-0.9.9.1-py2.4-linux-x86_64.egg/urwid/raw_display.py", > line 233, in run_wrapper > > self.start(alternate_buffer) > > File > "/usr/lib64/python2.4/site-packages/urwid-0.9.9.1-py2.4-linux-x86_64.egg/urwid/raw_display.py", > line 180, in start > > self._old_termios_settings = termios.tcgetattr(0) > > termios.error: (22, 'Invalid argument')
Hello, If you change the 0 to sys.stdin.fileno() does it work for you? Ian _______________________________________________ Urwid mailing list [email protected] http://lists.excess.org/mailman/listinfo/urwid
