[Tutor] Tkinter widget (label) updated by TCP/IP message
mats at wichmann.us
Mon May 28 18:20:41 EDT 2018
On 05/28/2018 12:56 PM, Alejandro Chirife via Tutor wrote:
> Hi Alan,
> Thank you very much for your help. I will start working on ti. There's a lot to chew on here :)
> Two questions:
> 1. Got it that nothing to do when mainloop() gets called. How do you send an event of data arriving when the events for tkinter are all about user interaction?
> 2. You mentioned " create thread to run get_network_message" in your pseudocode (in main() ). Could you guide me towards which Class to use for this?
You're going to want to look at the threading module for threads, and
the socket and the select modules for networking. threading.Event and
threading.Timer may be of interest as to communicating with the other
thread and setting a timeout.
This isn't actually as trivial a problem as it may sound on the surface,
by the way, so don't worry if it takes a while to get right!
More information about the Tutor