[pygtk] threading

dave dave at immunitysec.com
Thu Aug 5 02:41:57 WST 2004

I seriously recommend NOT having your plugin do anything related to GTK. 
Don't even let it import the gtk stuff. Just have it call 
"mainapp.gui.method()" to do any of the gui work it needs done. That way 
you'll be able to have your main thread do all the gui stuff. Otherwise, 
you'll be in a world of hurt.


Le Boulanger Yann wrote:

> Hi all,
> I've a probleme with pygtk used in a thread.
> My application can be presented like that : I have a main thread that 
> do some things and that can lunch plugins. Plugins are lunched in a 
> new thread thanks to threading module.
> one of these plugins is a pygtk plugin :
> it starts gtk with gtk.gdk.threads_init(), gtk.main(), show windows, etc.
> Now the probleme is when I want to close this plugin : I close the 
> main window, then do a gtk.main_quit(), but the windows opened don't 
> close. GTK is no more active : I cannot do anything in them, but they 
> are always here ...
> Is it my Job to close them all before the gtk.main_quit() ?
> Asterix
>pygtk mailing list   pygtk at daa.com.au
>Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

More information about the pygtk mailing list