Martijn Brouwer wrote:
I would like to have my pygtk program call a function once every xx seconds. My purpose is to update some information, say, every 30 seconds. In an plain python program I would call sleep(xx) between the function calls. Since I am new to programming in event driven interfaces, I do not know to do this in a gtk interface. I guess, the gtk.mainloop has to take care for calling my function. How do I achieve this.
You can set a function to be called at regular intervals with gobject.timeout_add()
http://www.pygtk.org/pygtk2reference/gobject-functions.html#function-gobject--timeout-add
Make sure your callback (the function to be called) returns TRUE, otherwise it will be removed from the timeout list.
_______________________________________________ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/