For faster navigation, this Iframe is preloading the Wikiwand page for PyGTK.

PyGTK

PyGTK
開發者James Henstridge
当前版本
  • 2.24.0 (2011年4月1日;穩定版本)
  • 3.44.1 (2023年3月24日;滚动更新)[1]
編輯維基數據鏈接
源代码库 編輯維基數據鏈接
操作系统跨平台
平台跨平台
类型部件工具箱
许可协议LGPL
网站www.pygtk.org

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

語法

[编辑]

下面的代碼將產生一個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,以下是一些例子:

PyGObject

[编辑]
PyGObject
当前版本
  • 2.24.0 (2011年4月1日;穩定版本)
  • 3.44.1 (2023年3月24日;滚动更新)[1]
編輯維基數據鏈接
源代码库gitlab.gnome.org/GNOME/pygobject/blob/master/NEWS
编程语言Python, C
类型部件工具箱
许可协议LGPL
网站wiki.gnome.org/Projects/PyGObject

PyGObject为Python程序访问基于GObject的库提供了包装库,GObject是GTKGIO英语GIO (software)GStreamer等库使用的对象系统。

参考资料

[编辑]
  1. ^ 1.0 1.1 PyGObject 3.44.1 - 2023-03-24. 2023年3月24日 [2023年8月10日]. 
  2. ^ January 4th, 2008: ANNOUNCE PyGTK 2.24.0

參見

[编辑]
  • PyQt(Python包裝的Qt工具)
  • wxPython(Python包裝的WX工具收集)

外部連結

[编辑]
{{bottomLinkPreText}} {{bottomLinkText}}
PyGTK
Listen to this article

This browser is not supported by Wikiwand :(
Wikiwand requires a browser with modern capabilities in order to provide you with the best reading experience.
Please download and use one of the following browsers:

This article was just edited, click to reload
This article has been deleted on Wikipedia (Why?)

Back to homepage

Please click Add in the dialog above
Please click Allow in the top-left corner,
then click Install Now in the dialog
Please click Open in the download dialog,
then click Install
Please click the "Downloads" icon in the Safari toolbar, open the first download in the list,
then click Install
{{::$root.activation.text}}

Install Wikiwand

Install on Chrome Install on Firefox
Don't forget to rate us

Tell your friends about Wikiwand!

Gmail Facebook Twitter Link

Enjoying Wikiwand?

Tell your friends and spread the love:
Share on Gmail Share on Facebook Share on Twitter Share on Buffer

Our magic isn't perfect

You can help our automatic cover photo selection by reporting an unsuitable photo.

This photo is visually disturbing This photo is not a good choice

Thank you for helping!


Your input will affect cover photo selection, along with input from other users.

X

Get ready for Wikiwand 2.0 🎉! the new version arrives on September 1st! Don't want to wait?