适用于 Python 3 的小部件工具包 [英] Widget Toolkits for Python 3

查看:14
本文介绍了适用于 Python 3 的小部件工具包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因为我喜欢尽可能地让我的程序适应未来,所以我使用正在开发的最新技术.但是,GTK(以及许多其他小部件工具包)似乎与 Python 3 不兼容.是否有任何小部件工具包完全支持 Python 3?

Because I like to future-proof my programs as much as I possibly can, I use the latest technologies under development. However, GTK (along with many other widget toolkits) does not appear to be compatible with Python 3. Are there any widget toolkits that fully support Python 3?

谢谢.

推荐答案

目前,使用 Python 进行 GTK+ 编程主要有两种方式:

Currently, there are two main ways of doing GTK+ programming with Python:

  • 已弃用的 PyGTK,它使用静态 GTK+ 绑定,因此维护起来很繁琐.因此,它经常落后于 GTK+ 最先进的技术.

  • The deprecated PyGTK, which use static GTK+ bindings, and therefore tedious to maintain. It often lagged behind GTK+ state-of-the-art as a result.

更现代的 PyGObject,它正在通过使用 gobject-introspection.

其中,只有第二种方法适用于 Python 3.这项工作相当新,您可能会在这里和那里遇到一些错误,并且可能会更改 API,更不用说文档不足了.如果您仍然继续,请加入 邮件列表 和/或 IRC频道,#python @irc.gimp.net,但请从 教程.

Of these, only the second method works with Python 3. This work is fairly new, and you are likely going to face some bugs here and there, and perhaps changing API, not to mention not-enough documentation. If you proceed anyways, go join the mailing list and/or the IRC channel, #python @irc.gimp.net, but do start with the tutorial.

这篇关于适用于 Python 3 的小部件工具包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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