[pygtk] PyGTK and multithreading

Johan Dahlin jdahlin at async.com.br
Fri Apr 14 00:27:38 WST 2006


regis wrote:
> You should call gtk.gdk.threads_init() before gtk.main() to enable
> threads in your Gtk+ application.

The proper way is to call gobject.threads_init() and doing before any other
code is executed, eg:

import gobject
gobject.threads_init()
import gtk

...

-- 
Johan Dahlin <jdahlin at async.com.br>
Async Open Source


More information about the pygtk mailing list