PySimpleGUI包装了tkinter,可以在Python 3和2.7上运行。它也可以在Qt、WxPython和网络浏览器上运行,所有平台都使用相同的源代码。
你可以利用所有你在tkinter中发现的同样的部件(滑块、复选框、单选按钮...)来制作自定义图形用户界面。 代码往往是非常紧凑和可读的。
#!/usr/bin/env python
import sys
if sys.version_info[0] >= 3:
import PySimpleGUI as sg
else:
import PySimpleGUI27 as sg
layout = [[ sg.Text('My Window') ],
[ sg.Button('OK')]]
window = sg.Window('My window').Layout(layout)
button, value = window.Read()
看到没有人提到Kivy,我感到很惊讶!!。
我曾经用Tkinter做过一个项目,虽然他们确实鼓吹Tkinter有了很大的改进,但还是给我一种windows98的感觉,所以我改用了Kivy.
我一直在关注一个辅导系列 if it helps...
为了让大家了解kivy的样子,请看这个(我正在做的项目)。
而我已经为它工作了不到一个星期了!你问我对Kivy的好处是什么?
你问Kivy的好处是什么?请看this
我选择这个的原因是,它的外观和它也可以在移动中使用。