| FAQ Index - Search - Recent Changes - Everything - Add entry |
20.7. I set up a timeout handler using timeout_add, but the handler only runs once.
When using a timeout handler:
def on_timeout(self, *args): print "Ping", args gobject.timeout_add(1000, on_timeout)If you fail to return True in the timeout handler, it will only run once. Therefore:
def on_timeout(self, *args): print "Ping", args return Truewill run the timeout handler every 1s.
