[pygtk] Re: freeze problem
Víctor M. Hernández Rocamora
victor.hr at gmail.com
Tue Mar 15 04:30:14 WST 2005
Hi, you have to put all the gtk calls running in a different thread,
between a gtk.gdk.threads_enter() and a gtk.gdk.threads_leave(). I've
a attached a modifed test.py that works in my system.
On Mon, 14 Mar 2005 13:23:45 +0100, Le Boulanger Yann
<asterix at lagaule.org> wrote:
> I've a problem when I use gtk.Dialog.run() funtion in a thread
> I attached a small example that shows the problem.
> If you run test.py, it works (in this case threads are not used).
> But now if you run core.py (which launch a thread that does exactly the
> same thing) when I press a key in the dialog window, the dialog is not
> destroyed and the application freezes.
> I don't understand why this happens and what can I do to have it working
> with threads.
> My intention is from the thread to run() the dialog and wait for the
> user to give the password and then use it. run() would normally do this,
> but it freezes with threads. I saw a workaround in FAQ 10.17 (about
> dialog.run running in the mainloop), but that won't block in a mainloop
> so it doesn't suit me.
> does someone has an idea ?
> pygtk mailing list pygtk at daa.com.au
> Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1665 bytes
Desc: not available
Url : http://www.daa.com.au/pipermail/pygtk/attachments/20050314/637625d5/test.py
More information about the pygtk