[pygtk] Pygtk toggle hide show with time interval

craf pyclutter at gmail.com
Sat May 7 04:32:03 WST 2011


hi.

import gtk, pygtk
pygtk.require('2.0')
import time

class test():
  def __init__(self):
    self.window=gtk.Window(gtk.WINDOW_TOPLEVEL)
    self.window.connect=('delete_event',lambda wid, we: gtk.main_quit())
    self.window.show()
    gtk.gdk.flush()
    print "show"
    time.sleep(2)
    self.window.hide()
    gtk.gdk.flush()
    print "hide"
    time.sleep(3)
    self.window.show()
    print "show"

if __name__ == "__main__":
  test()
  gtk.main()


Regards.

Cristian



More information about the pygtk mailing list