用于Python 3的小工具工具包 [英] Widget Toolkits for Python 3
问题描述
因为我喜欢尽可能多地对我的程序进行未来验证,所以我使用正在开发的最新技术。然而,GTK(以及其他许多小工具工具包)看起来并不与Python 3兼容。是否有任何可以完全支持Python 3的小工具工具箱?
谢谢。 / p>
目前,有两种使用Python进行GTK +编程的主要方式:
-
已弃用的PyGTK ,它使用静态的GTK +绑定,因此很难维护。它通常落后于GTK +现状。
-
更现代的PyGObject ,它使用 gobject-introspection转向动态绑定。其中,只有第二种方法适用于Python 3.这项工作是相当新的,而且你可能会面临一些错误,并且可能会改变API,更不要说文档不够。如果您仍然继续,请加入邮件列表和/或IRC频道,
#python @ irc.gimp.net
,但是以教程。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?
Thanks.
解决方案Currently, there are two main ways of doing GTK+ programming with Python:
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.
The more modern PyGObject, which is moving towards dynamic bindings by using gobject-introspection.
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屋!