图形化界面可以使用PyQt5, PyQt4, wxPython or Tk.模板

Graphical interfaces can be made using a module such as PyQt5, PyQt4, wxPython or Tk.

If you are not sure which to pick, read the Introduction to GUI.

Articles about the latest version of cross-platform toolkit.

PyQT4 / QT
A popular cross-platform toolkit developed by Riverbank Computing.

The standard GUI package for Python.

WxPython, WxWidgets
A cross platform GUI toolkit.






两个用的人都很多,运行速度方面两个差别感觉不是很大,开发上因为pyQt4是有商业的支持有eric4这种ide界面设计也方便。但pyqt4是不能用 在商业软件中的,有版权问题,要付费的,开源软件的话没这问题。开发效率都还可以,两个也都可以跨平台。在windows上用py2exe打包出来的东西 是wxpython要小一点。

PyQt和wxPython我都用过一点点,3D打印非常流行的切片软件Crua是用wxPython写的(,之后学QT,就顺便学了下PyQt。感觉除了信号槽两者没太大区别,但是Qt designer真心好用,布局起来飞快。wxPython我也用过一些类似的工具,总之是很麻烦,可能也是我没有找到合适的? 其他的我就不懂了。

To create a graphical interface (GUI) in Python you need to make use of a library or module.  There are at least three widely used modules for creating GUIs with Python:

While you can create a graphical user interface (GUI) with any of these modules, they do not have the same features.

Tk provides basic widgets such as a button, menu, text and label. It is very limited compared to QT4 and WxPython but it is also the oldest module.  It runs on most versions of Mac OS, Linux and Windows.

TkMessage boxa messagebox in Tk. GUIs made in Tk do not have a native look.

QT4 and QT5 are developed by the Qt company.  Graphical applications made with QT4 or QT5 run on Windows, Linux/X11 and Mac OS X.  It has tons of widgets including tabs, buttons, item views, table views, progressbars, input fields, calendar views and many more. Compared to Tk it has a lot more widgets available.

Graphical application using PyQt5

WxPython is a module that creates a native GUI look regardless of the operating system used. On Windows it will look as windows application while on Mac OS it will look as a Mac application. This can be a clear advantage compared to QT4 or Tk, depending on your purpose. WxWidgets has many widgets available such as buttons, menu, text but also more advanced widgets as a htmlview or tree control.

wxTabsA window created with wxPython. wxPython has native appearance on all operating systems.