Install pygtk in python2.3 in Windows

Source: Internet
Author: User
Tags gtk
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 gtk

def 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()

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.