import time

from gi.repository import GLib, Gtk

GLib.timeout_add(10, Gtk.main_quit)
time.sleep(0.02)
Gtk.main()

GLib.timeout_add(10, Gtk.main_quit)
time.sleep(0.02)
Gtk.main()

GLib.timeout_add(10, Gtk.main_quit)
time.sleep(0.02)
Gtk.main()

GLib.timeout_add(10, Gtk.main_quit)
time.sleep(0.02)
Gtk.main()

GLib.timeout_add(10, Gtk.main_quit)
time.sleep(0.02)
Gtk.main()
