Python: Attractive, clean, packagable windows GUI library [closed]

自作多情 提交于 2019-12-23 19:20:02

问题


I need to create a simple windows based GUI for a desktop application that will be downloaded by end users. The application is written in python and will be packaged as an installer or executable.

The functionality I need is simple - selecting from various lists, showing progress bars, etc. No animations, sprites, or other taxing/exotic things.

Seems there are quite a few options for Python GUI libraries (Tk, QT, wxPython, Gtk, etc). What do you recommend that:

  • Is easy to learn and maintain
  • Can be cleanly packaged using py2exe or something similar
  • Looks nice

[Update] For what it's worth I ended up going with tkinter. It's fairly well documented, can be made to look nice (mainly, use native fonts), and most importantly ships with Python so there's nothing extra to worry about. wxpython also looked good, but the download was 10M or so, and I didn't want to add that extra weight to the packages I distribute.


回答1:


tkinter's major advantage (IMHO!) is that it comes with Python (at least on Windows). It looks ugly, and there's no progress bar or something like that (at least not builtin). Being a thin wrapper around Tk, its API doesn't feel very elegant or intuitive. However, there are quite a few good Tkinter resources on the web so learning it is not necessarily a pain.

For any serious GUI attempts, I'd go for wxPython as well. I don't know about packaging, though. But I wouldn't expect any problems.




回答2:


I've recommended wxPython in the past and it's still an excellent tool. The others always seemed somewhat cumbersome to me.

There's instructions out there on the web which show exactly how to package a wxPython GUI.

The wxAui section in particular can give some really clean / usable results:




回答3:


The most beautiful one that I can suggest is PyQt (almost native), otherwise a good idea would be using directly IronPython that is native .net code.

Anyway nothing beats tkinter for multi-platformness and packaging-friendliness.




回答4:


I've used wxPython in the past (For Mac/Windows deployments). It has worked good. And it looks nicer than Tk :)




回答5:


From using both wxPython and TKinter, I'd say wxPython looks nicer and is easy to learn.

Although you said you are planning on using the program for Windows, it's worth mentioning that I've had problems with TKinter on Mac not working correctly.



来源:https://stackoverflow.com/questions/2962194/python-attractive-clean-packagable-windows-gui-library

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!