Suggestions on sockets and Tkinter

T Teemu E Kurppa ttkurppa at cs.Helsinki.FI
Fri Oct 20 09:08:14 EDT 2000


I'm trying to do simple robot football simulator with Python. 
Simulator receives commands through sockets (INET, not Unix), updates
its state, and finally sends results to clients.  In addition to that, it
should view its state (playground with robots drawn to it) in one
window. I've decided to try this with Tkinter, but there's problem. 
 
Main purpose of simulator is to simulate the game, NOT to view it. So it
should read sockets frequently and update it state, and now and then
(approx. 10 times in second ...) also update the graphical view. 
However, in Tkinter programming, I must enter to Tkinter's mainloop, and
can not run my own. Now, I can use after command or createfilehandler to
get events for handling the sockets, but for my needs this solution will
turn the situation wrong-side-up.



-- 
Teemu Kurppa
Teemu.Kurppa at Helsinki.fi



More information about the Python-list mailing list