I am trying to create a simple PyGTK window running on Windows 7. I used the PyGTK-all-in-one installer from: http://ftp.gnome.org to install the necessary PyGTK dependencies for 32-Bit Python 2.7.2. However, whenever I create a simple GTK window in IDLE using the code:
import gtk
mainWindow = gtk.Window()
mainWindow.show()
the window is displayed, but instantly stops responding and is unable to be moved, re-sized, etc. Is there a simple way to prevent this from happening?
Thank you in advance!
Running my code from the PyGtk Command Prompt rather than IDLE prevents the window from crashing.
Edit: Adding a main loop to my code, as noted here, prevents the window from crashing when run with IDLE.