Code: Alles auswählen
import gtk
import gobject
def alive():
print "still alive"
return True
gtk.gdk.threads_init()
gobject.timeout_add(1000, alive)
dialog = gtk.MessageDialog(message_format="click ok to freeze the mainloop",
buttons=gtk.BUTTONS_OK)
gobject.timeout_add(2000, dialog.run)
gtk.main()