[Tutor] Tkinter widget (label) updated by TCP/IP message
Alejandro Chirife
acb001 at yahoo.com
Sun May 27 11:18:47 EDT 2018
Hi all, I am having a hard time to create what at first looked like a simple program with Python 3 and Tkinter:
The UI consist of a window with a label and a button.
The label shows "waiting for a message" and the button shows "reset display".
The handler for the button click just resets the label text to "waiting for a message".
The program would draw the window with the two widgets with root.mainloop() while it is capable of listening on a TCP port for an arriving message like "hello world", and when it arrives it would show the text in the label.
The received message should show in the label until any of the following occurs:
- Has been shown for 10 seconds- Another packet arrived with new message (will show the new message in the label)- User clicks on the "reset display" button
I will really appreciate if someone could give me some guidance on how to manage this with Python 3.
Thanks!AC
More information about the Tutor
mailing list