hmm, soory for the repost, I'm having trouble with the list not
accepting my posts again :/
Hi,
I'm having a similar problem, I want to call an external binary
asyncronously and once this is finished, I want to update my urwid
screen accordingly.
I just wanted to check: How about using urwids signals for this? Can I
emit some
selfmade signal in the child thread and then the parent responds with
a callback
that updates the screen? Or would theat signal be cought by a copy of
the mainloop that sits inside the thread?
Sorry for my confusion here :/
I'm using something along the lines of:
def thread_code(*popenArgs):
returncode = subprocess.call(*popenArgs, shell=True)
if returncode == 0:
#do stuff with the screen
ui.mainloop.draw_screen()
thread = threading.Thread(target=thread_code, args=((cmd,)))
thread.start()
thanks,
/p
_______________________________________________
Urwid mailing list
[email protected]
http://lists.excess.org/mailman/listinfo/urwid