Thread and tkMessageBox (Synchonimous)

A

Askari

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?

Askari
 
J

Jp Calderone

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

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQE/5v+8edcO2BJA+4YRAmGHAKCujOQuC/FAYmxGLz1WTg7ctqNFDgCcDcVc
mKfonWoCb2cZq6QZouoKcZw=
=CaKi
-----END PGP SIGNATURE-----
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top