[Tutor] Functions and Mainloop()

John Fouhy john at fouhy.net
Thu Jan 8 21:14:45 CET 2009

2009/1/9 Jonathan Balkind <finde.m at gmail.com>:
> Hi tutor list,
> I haven't been programming for long with Python, and I'm currently trying to
> make a simple game using Tkinter. I was wondering whether it is possible to
> submit a function to the mainloop so it will run every time the loop goes
> around? I thought about adding the function to the event handler, but I was
> hoping I could just submit the function to the mainloop.

Hi Jonathan,

You can use the after() method.  See here:


More information about the Tutor mailing list