PyGTK是一套用Python封裝的,用於GTK+GUI庫。PyGTK是在LGPL授權下的自由軟件。它的作者是GNOME開發者James Henstridge。PyGTK核心研發團隊有6人,與及其他不同開發者和用戶提出修正報告和補丁。PyGTK所開發的應用程式更已被選應用於OLPC的系統之上。

Quick Facts 開發者, 目前版本 ...
PyGTK
開發者James Henstridge
目前版本2.24.0(2011年4月1日,​13年前​(2011-04-01[1]
原始碼庫 編輯維基數據連結
作業系統跨平台
平台跨平台
類型部件工具箱
許可協定LGPL
網站www.pygtk.org
Close

語法

下面的代碼將產生一個200x200像素的窗口,內裏列出"Hello World"的文字

import gtk

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

createWindow()
gtk.main()

使用PyGTK的常見程式

有不少常見的應用程式用上了PyGTK,以下是一些例子:

  • Anaconda installer
  • BitTorrent
  • Deluge(BitTorrent的客戶端)
  • Emesene
  • Exaile
  • Flumotion
  • gDesklets
  • Gedit(用於可選的Python子系統和外掛程式)
  • GIMP(用於可選的Python script)
  • GNOME Sudoku
  • GRAMPS英語Gramps_(software)
  • Itaka
  • Jokosher
  • PyMusique
  • Pybliographer
  • Quod Libet
  • ROX Desktop
  • ROX-Filer
  • Stoq

PyGObject

Quick Facts 目前版本, 原始碼庫 ...
Close

PyGObject為Python程式訪問基於GObject的庫提供了包裝庫,GObject是GTKGIO英語GIO (software)GStreamer等庫使用的對象系統。

參考資料

參見

外部連結

Wikiwand in your browser!

Seamless Wikipedia browsing. On steroids.

Every time you click a link to Wikipedia, Wiktionary or Wikiquote in your browser's search results, it will show the modern Wikiwand interface.

Wikiwand extension is a five stars, simple, with minimum permission required to keep your browsing private, safe and transparent.