Install pygtk in python2.3 in Windows. The version is always faulty during installation. The experiment was successful only after several attempts,
Python2.3.3
Pygtk-2.2.0.win32-py2.3.exe(or pygtk-2.2.0-1.win32-py2.3.exe)
Gtk-runtime-environment-2.2.4.exe(or gtk-runtime-environment-2.2.4.2.exe)
Install the above. If there are other GTK files installed on the machine,
It's hard to ensure the version,
After the GTK-Runtime-Environment-2.2.4.exe is installed,
Add C:/program files/common files/GTK/2.0/lib (specific installation path) to path,
This is where all its dynamic connection libraries are located.
Pygtk-2.2.0.win32-py2.3.exe here: http://www.pcpm.ucl.ac.be /~ Gusti N/win32_ports/binaries/pygtk-2.2.0.win32-py2.3.exe
Pygtk-2.2.0-1.win32-py2.3.exe here: http://www.pcpm.ucl.ac.be /~ Gus TiN/win32_ports/binaries/pygtk-2.2.0-1.win32-py2.3.exe
GTK-Runtime-Environment-2.2.4.exe here: http://www.org.lcs.mit.edu/6.893/files/GTK -runtime-environment-2.2.4.exe
There is also http://sourceforge.net/projects/gtk-win/ on sourceforge.net:
Recommended tools: glade2 http://gladewin32.sourceforge.net/
Test code
Code:
import gtkdef hello_cb(button):
print "Hello World"
window.destroy()
window = gtk.Window(gtk.WINDOW_TOPLEVEL) # create a top level window
window.connect("destroy", gtk.mainquit) # quit the event loop on destruction
window.set_border_width(10) # set padding round child widget
button = gtk.Button("Hello World")
button.connect("clicked", hello_cb) # call hello_cb when clicked
window.add(button) # add button to window
button.show() # show button
window.show()
gtk.main()