In GTK2, I enjoyed building a gui in the interpreter (ipython or plain python) "on the fly" and seeing the changes in real time like this:
>>> import gtk
>>> win = gtk.Window()
>>> win.connect('delete-event', gtk.main_quit)
10L
>>> win.show_all()
Which will result in showing a window to which I could add objects.
I'm changing to Gtk3 in part because it is the future and in part because I sometimes use Glade which now is only Gtk3. In doing the same with GTK3 DOESN'T show the window:
>>> from gi.repository import Gtk
>>> win = Gtk.Window()
>>> win.connect('delete-event', Gtk.main_quit)
13L
>>> win.show_all()
Alas, no window after that last line. It won't show until:
>>> Gtk.main()
I even tried:
>>> win.show_now()
Which did nothing.
Any ideas how to build in real time in GTK3?
Thanks,
Narnie