On dimanche 11 janvier 2009, Thomas Wielatt wrote:
> Hi Everyone
> I've been developing a gui that runs on a separate thread. I prefer to
> update the gui manually by calling main.iteration() in a defined
> interval. This works fine under ubuntu intriped.
> *****************************************
> class Gui (Thread)
> ....
> def run(self):
> self.__running = True
> while self.__running:
> time.sleep(1.0/self.__action_rate)
> while gtk.events_pending():
> gtk.main_iteration()
> ******************************************
Calling GTK functions in threads is never a good idea... You should move
your loop in the main thread.
You could also try to call:
gtk.gdk.threads_init()
gtk.gdk.threads_enter()
before any other GTK call, in the main thread.
--
Frédéric
http://www.gbiloba.org
_______________________________________________
pygtk mailing list [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/