wxPythonPython语言的GUI工具包,作为Python的扩展模块实现,包装了wxWidgets

Quick Facts 开发者, 首次发布 ...
WxPython
开发者Robin Dunn
Harri Pasanen
首次发布1998年,​26年前​(1998[1]
当前版本4.1.1[2](2020年11月21日,​3年前​(2020-11-21
源代码库 编辑维基数据链接
编程语言C++ / Python
操作系统跨平台
许可协议wxWindows授权条款
网站wxpython.org
Close

wxPython是跨平台的,开源的。

范例

以下是一个简单的wxPython的Hello World模块,描述了在wxPython中的两个主要物件(主视窗物件和应用程序物件),然后借由呼叫MainLoop()控制事件驱动系统,而该系统负责该程式的使用者互动部分。

#!/usr/bin/env python
import wx

app = wx.App(False)  # Create a new app, don't redirect stdout/stderr to a window.
frame = wx.Frame(None, wx.ID_ANY, "Hello World") # A Frame is a top-level window.
frame.Show(True)     # Show the frame.
app.MainLoop()

使用wxPython开发的程式

参见

参考资料

延伸阅读

外部链接

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.