Making a very simple tic-tac-toe game in Python using a P2P architecture with sockets. Currently my GUI has button that says 'Create' that will open up and draw a new game board window, create a socket, bind, listen, and accept a connection. The 'Join' button will open and draw a new gameboard and connect to that 'server'. 
I'm trying to have it show a message saying 'Waiting for player...' when you create a game, a cancel button to stop and go back to the main menu, and have it disappear on it's own if a connection has been accepted.
I tried using tkMessageBox but the script stops until the user clears the message so there's no way for me to listen/accept until the user presses something. 
What other way is there for me to accomplish this?
Thanks!
Sounds like a threading issue. 
I'm unfamiliar with TK graphics, but I'd imagine what you need to do is start the window showing the "waiting for player" message. That window then loops waiting for something to happen.
When the message box displays you need to have the "listening" done on another thread, which signals back to the main message box when someone's connected using a semaphore or a queue. 
On your main GUI thread you need to make the loop:

check the queue or semaphore for values. If there's a value on there that you expect, close the box. This would need to be non-blocking so that the GUI thread can still check for input from the user.
check for user input. That's probably done using callback functions though.
Python: Show message 'Waiting for player...' while socket listens for connection