jerradgenson at gmail.com
Sun Aug 15 21:59:08 CEST 2010
I'm learning Tkinter, and I have an issue that I'd appreciate help
with. I have a program that initializes a GUI (I'll call this the "GUI
process"), then spawns another process that listens on a network via
the TCP/IP protocol for incoming strings (I'll call this the "server
process"). Everything works well up to this point.
What I want to happen next is for the server process to update a label
in the GUI process when it receives a message from the network. First
I tried passing a control variable for the label's text into the
server process, but when I updated the control variable, nothing
happened(no error messages, no feedback of any kind).
I tried piping the message from the server process into the GUI
process using os.write() and os.read() - and this works, but not the
way I need it to. I need the label to be updated automatically,
without any intervention from the user (at the moment, it only works
when the user clicks an "Update" button). I tried having the GUI
process check the pipe for messages automatically, but when I do this
it hangs when there's nothing in the pipe.
I've tried other avenues as well, but probably nothing worth
mentioning. If you have any suggestions, I would be very grateful.
More information about the Python-list