有什么“好的编程"吗?Python 的 GUI 工具包? [英] Are there any "nice to program" GUI toolkits for Python?

查看:31
本文介绍了有什么“好的编程"吗?Python 的 GUI 工具包?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我玩过 GTK、TK、wxPython、Cocoa、curses 等.它们使用起来相当糟糕.. GTK/TK/wx/curses 似乎基本上都是适当 C 库的直接端口,而 Cocoa 基本上要求同时使用 PyObjC 和 Interface Builder,这两者我都不喜欢..

Ruby 的 Shoes GUI 库很棒.它的设计非常明智,而且非常红宝石化",并且从 Web 开发中借用了一些很好用的东西(例如使用十六进制颜色代码,或 :color => rgb(128,0,0))

正如标题所说:有没有不错的Pythonic"GUI 工具包?

解决方案

你看过Qt/PyQt?尽管 PyQt 是 C++ 库的直接移植,但我发现与您列出的其他库相比,它更 Python 化且易于编程.它也有很好的文档.

Dabo 在 wxPython 之上实现了一个不错的 ui 库.它是一个主要用于以数据库为中心的应用程序的框架,但 ui 库可以单独使用.

还有其他一些尝试创建一个非常 Pythonic 的 gui 作为 PyGtk 或 wxPython 之上的层,例如 waxPyGui,这似乎是在不同程度的完成上卡住".

此外,可以在此处找到详尽的 Python GUI 工具包列表.

I've played around with GTK, TK, wxPython, Cocoa, curses and others. They are are fairly horrible to use.. GTK/TK/wx/curses all seem to basically be direct-ports of the appropriate C libraries, and Cocoa basically mandates using both PyObjC and Interface Builder, both of which I dislike..

The Shoes GUI library for Ruby is great.. It's very sensibly designed, and very "rubyish", and borrows some nice-to-use things from web development (like using hex colours codes, or :color => rgb(128,0,0))

As the title says: are there any nice, "Pythonic" GUI toolkits?

解决方案

Have you looked at Qt/PyQt? Although PyQt is a direct port from the C++ library, I find it much more pythonic and nice to program with compared to the others you listed. It also has very good documentation.

Dabo has a nice ui library implemented on top of wxPython. It's a framework intended mostly for database-centric applications, but the ui library can be used separately.

There are/were several other attempts to create a very pythonic gui as a layer on top of PyGtk or wxPython, such as wax and PyGui, which seem to be "stuck" at various degrees of being complete.

Also, an exhaustive list of Python GUI toolkits can be found here.

这篇关于有什么“好的编程"吗?Python 的 GUI 工具包?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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