PDA

View Full Version : [SOLVED] tkMessageBox and Threads



themusicwave
March 18th, 2008, 09:16 PM
I have an interesting and annoying problem.

I have a thread that is started when a user clicks a button in my TK GUI.

I want to pop up a messageBox and prompt the user in that thread, however when I do all of python freezes.

When I say all of python freezes I mean all of it. I have to kill the python process. It totally locks up.

Anyone have this problem before? I am guessing it is a thread issue??

kknd
March 19th, 2008, 05:56 PM
[QUOTE=themusicwave;4540926
When I say all of python freezes I mean all of it. I have to kill the python process. It totally locks up.
[/QUOTE]

You can only do GUI stuff inside the main thread. Maybe Tk have some utility functions to do this.

themusicwave
March 19th, 2008, 05:59 PM
That's what i figured..

Thanks for confirming it. I did manage to get to to work by poping up boxes only in the main thread. I did some data piping between the main thread and the other threads and it works.