我正在设计一个 GUI python 程序,我决定使用 GTK+3。
在这里阅读一些文档:http: //python-gtk-3-tutorial.readthedocs.org/en/latest/index.html我知道我可以使用 gi.repository.Gtk 模块作为 GTK+3 库的 API。
但是当我尝试这样做时,它一直警告我它正在使用 GTK+2 模块:
>>> import gi.repository.Gtk
/usr/lib/python2.7/dist-packages/gi/overrides/Gtk.py:47: RuntimeWarning:
You have imported the Gtk 2.0 module. Because Gtk 2.0 was not designed
for use with introspection some of the interfaces and API will fail.
As such this is not supported by the pygobject development team and
we encourage you to port your app to Gtk 3 or greater. PyGTK is the
recomended python module to use with Gtk 2.0
warnings.warn(warn_msg, RuntimeWarning)
我不知道如何解决这个问题……我怎么能真正转向使用 GTK+3 呢?