python - Execute Multi-threading process -


I am writing a code for a simple chat client in Python. I have a PHP server to store GUIs, strings and other data. I want to enable my code to update the chat (conversation text field) every 1 second. I post some pseudo code:

  GUI setup User Send message to userx Send message to X MessageX   

At this point I want something that checks for each other if userX (which is user1 or Can be user2) There are new messages to be deleted. If I put something like this:

  while correct: time.sleep (1) check anddesignplayNew message ()   

GUI does not appear! Because at the end of the code to start me again mainloop ()

, I want my code to give users the possibility to send and receive Asynchronous! If you type messages in a message with a part of the code to send messages, and in the second part the message is constantly being checked for new messages.

You have not used the GUI toolkit; from menopause () I think this is t.

Multithrading is not required.

Comments