[pygtk] Threads in PyGTK: keep typing while ping-ing
frederic.mantegazza at gbiloba.org
Tue Feb 17 20:14:54 WST 2009
On mardi 17 février 2009, Mamahita Sela wrote:
> Any help would be appreciated :)
You start a thread using gobject.timeout, but you wait for the end of the
thread at the same place; so, the thread is useless, there. Don't forget
that gobject-timeout is exectud in tha GTK mainloop, so, when it is doing
something, GTK events are not refreshed.
You have several ways to do waht you want:
1) using gobject.timeout, and laucnh the thread, but do not wait for the
end (do not call join)
2) launching only one thread, and in the run method, do an endless loop,
pinging and sleeping
3) same as one, but call thread.start_new_thread...
Hope this helps.
More information about the pygtk