شما با نصب این کتابخانه ها میتونید از کد ها اونها در برنامه تون استفاده کنید و بعد برنامه ایی رو که نوشتید اجرا کنید.
در مثال زیر از کد های PyQt (http://en.wikipedia.org/wiki/Pyqt) برای تولید رابط گرافیکی برنامه Hello World استفاده شده:
#! /usr/bin/env python
# -*- coding: utf-8 -*-
#
# Here we provide the necessary imports.
# The basic GUI widgets are located in QtGui module.
import sys
from PyQt4.QtGui import *
# Every PyQt4 application must create an application object.
# The application object is located in the QtGui module.
a = QApplication(sys.argv)
# The QWidget widget is the base class of all user interface objects in PyQt4.
# We provide the default constructor for QWidget. The default constructor has no parent.
# A widget with no parent is called a window.
w = QWidget()
w.resize(320, 240) # The resize() method resizes the widget.
w.setWindowTitle("Hello, World!") # Here we set the title for our window.
w.show() # The show() method displays the widget on the screen.
sys.exit(a.exec_()) # Finally, we enter the mainloop of the application.
(http://upload.wikimedia.org/wikipedia/commons/6/6d/PyQt_screen.png)
یا در مثال زیر از PyGTK برای تولید برنامهی قبلی استفاده شده:
import gtk
def create_window():[url][/url]
window = gtk.Window()
window.set_default_size(200, 200)
window.connect('destroy', gtk.main_quit)
label = gtk.Label('Hello World')
window.add(label)
label.show()
window.show()
create_window()
gtk.main()
(http://[/url)