Python:有吸引力、干净、可打包的 Windows GUI 库 [英] Python: Attractive, clean, packagable windows GUI library

查看:33
本文介绍了Python:有吸引力、干净、可打包的 Windows GUI 库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要为最终用户下载的桌面应用程序创建一个简单的基于 Windows 的 GUI.该应用程序是用 python 编写的,将被打包为安装程序或可执行文件.

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.

Python GUI 库(Tk、QT、wxPython、Gtk 等)似乎有很多选项.您有什么建议:

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

  • 易于学习和维护
  • 可以使用 py2exe 或类似工具进行干净的打包
  • 看起来不错

[更新] 为了它的价值,我最终选择了 tkinter.它有很好的文档记录,可以做得很好(主要是使用原生字体),最重要的是随 Python 一起提供,所以没有什么可担心的.wxpython 看起来也不错,但是下载了 10M 左右,我不想在我分发的包中增加额外的重量.

[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.

推荐答案

tkinter 的主要优势(恕我直言!)是它带有 Python(至少在 Windows 上).它看起来很难看,而且没有进度条或类似的东西(至少不是内置的).作为 Tk 的瘦包装器,它的 API 感觉不是很优雅或直观.不过,网络上有不少不错的 Tkinter 资源,所以学习它并不一定很痛苦.

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.

对于任何认真的 GUI 尝试,我也会选择 wxPython.不过,我不知道包装.但我不希望有任何问题.

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.

这篇关于Python:有吸引力、干净、可打包的 Windows GUI 库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆