Thread and tkMessageBox (Synchonimous)

Jp Calderone exarkun at intarweb.us
Mon Dec 22 09:29:16 EST 2003


On Mon, Dec 22, 2003 at 03:34:10AM -0800, Askari wrote:
> I think that my problem is in the syncho between main thread and my
> thread created with (with thread.start_new_thread(...) ). But, I don't
> understand the method for syncho with a thread...
> 
> I want pop a message to user with
> tkMessageBox.showinfo("Title","Message") but when this command is in
> my thread, it's don't work (and my main thread give no reponse
> (crash)).
> 
> How I can pop a message (or question) with a thread?
> 

  All Tkinter calls must be made in the main thread.  Perhaps you can solve
this problem by making the showinfo call in the main thread and running your
own code in another thread, or perhaps you can solve it by displaying GUI
widgets using non-blocking APIs, thus obviating the need for threads at all.

  Jp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 196 bytes
Desc: Digital signature
URL: <http://mail.python.org/pipermail/python-list/attachments/20031222/9e668966/attachment.sig>


More information about the Python-list mailing list