[pygtk] Pygtk toggle hide show with time interval
John Stowers
john.stowers.lists at gmail.com
Sat May 7 05:50:25 WST 2011
>
>
>
> Hey thats working,
> Thanx and can you please explain me why shall I use this flush.
> I just read that gtk.gdk.flush() creates output and wait until sll
> requests are processed
> what does that actually mean
Dont write code like this.
1) time.sleep() blocks the mainloop and your program basically stops
(which is useless and not a good idea in the real world)
2) flush() forces the main loop to run until events are processed, thus
showing your window. But then it stops again during sleep. See #1
If you want to achieve delays in a gtk program use
glib/gobject.timeout_add
John
>
>
>
> Regards.
>
> Cristian
>
> Regards
>
> phanindra
>
> _______________________________________________
> pygtk mailing list pygtk at daa.com.au
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://faq.pygtk.org/
More information about the pygtk
mailing list