This obviously suicidal script falls into a 
'RunTimeError: called from outside of a mainloop'
caused by gtk.main_quit().
Why ?

    #!/usr/bin/env python
    import gtk
    win = gtk.Window(gtk.WINDOW_TOPLEVEL)
    win.show()
    gtk.main_quit()   # called from outside of a mainloop
    gtk.main()

I know, I can make this script run by using
    win.connect("destroy", gtk.main_quit)
in stead of the guilty line, but that doesn't help me, 
because in my real life script I want to do something like this:

    if some_condition:
        gtk.main_quit()
-- 
Egbert Bouwman - Keizersgracht 197 II - 1016 DS  Amsterdam - 020 6257991
========================================================================
_______________________________________________
pygtk mailing list   [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to