Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Thread and tkMessageBox (Synchonimous)

Reply
Thread Tools

Thread and tkMessageBox (Synchonimous)

 
 
Askari
Guest
Posts: n/a
 
      12-22-2003
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
 
Reply With Quote
 
 
 
 
Jp Calderone
Guest
Posts: n/a
 
      12-22-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

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

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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
thread and tkMessageBox Ajay Python 2 10-09-2008 05:15 PM
Error with Tkinter and tkMessageBox Fabio Z Tessitore Python 9 08-03-2007 08:42 AM
Tkinter, tkMessagebox and overrideredirect marcoberi@gmail.com Python 6 06-07-2007 11:11 AM
unexplained behavior of tkMessageBox.askyesno (2) Peter Kleiweg Python 1 09-07-2004 11:44 PM
unexplained behavior of tkMessageBox.askyesno Peter Kleiweg Python 4 09-07-2004 09:25 PM



Advertisments