On Thu, Sep 28, 2006 at 09:16:20PM +0200, Adolfo González Blázquez wrote:

> I would like to know if someone can point me a solution to make a
> function run as a separate thread, and wait until it is ended, without
> blocking the gui.

> In my application, i'm getting a long file listing using glob(), and i
> want this function to run as a thread, so the user can stop it using a
> button in the gui (right now, the gui freezes till glob is ended), and
> then run another function to fill the treeview (this now works without
> blocking the gui, using generators). .

Use a callback to handle the result and call it from your thread with
gtk.idle_add().

Dave Cook

_______________________________________________
pygtk mailing list   [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to