15 Feb 2012 09:24
MainLoop.remove_watch_pipe doesn't work?
Andrew Wu <andrewwu.tw <at> gmail.com>
2012-02-15 08:24:19 GMT
2012-02-15 08:24:19 GMT
Hello,
I tried to call MainLoop.remove_watch_pipe, but it doesn't work:
####
import urwid
txt = urwid.Text(u"Hello World")
fill = urwid.Filler(txt, 'top')
loop = urwid.MainLoop(fill)
def callback(data):
pass
fd = loop.watch_pipe(callback)
loop.remove_watch_pipe(fd)
loop.run()
####
I got error message:
Traceback (most recent call last):
File "t.py", line 11, in <module>
loop.remove_watch_pipe(fd)
File "/home/Andrew Wu/urwid/main_loop.py", line 205, in remove_watch_pipe
watch_handle, pipe_rd = self._watch_pipes.remove(write_fd)
AttributeError: 'dict' object has no attribute 'remove'
_______________________________________________ Urwid mailing list Urwid <at> lists.excess.org http://lists.excess.org/mailman/listinfo/urwid
RSS Feed