My little brother is just programming, and for his Science Fair project, he is doing a simulation of a flock of birds in the sky. He got most of his code written, and it works beautifully, but the birds must move every moment.
Tkinter, however, starts time for its own event loop, so its code will not work. The execution of root.mainloop() is executed, it starts and continues to work, and the only thing it starts is event handlers.
Is there a way for his code to work along with mainloop (without multithreading, it gets messy, and this should be simple), and if so, what is it?
Right now, he came up with an ugly hack by binding his move() function to <b1-motion> , so that while he holds the button and the mouse vibrates, it works. But there must be a better way.
python events tkinter
Allan S Jan 19 '09 at 20:40 2009-01-19 20:40
source share