小编Dan*_*yal的帖子

如何将 Python 程序从 gtk2 移植到 gtk3?

我们正在尝试将这个程序从 gtk2 移植到 gtk3。当我尝试时pygi-convert.sh,出现以下错误:

Traceback (most recent call last):
  File "scripts/amir", line 53, in <module>
    from gi.repository import GObject
  File "/usr/lib/python2.7/dist-packages/gi/__init__.py", line 39, in <module>
    raise ImportError(_static_binding_error)
ImportError: When using gi.repository you must not import static modules like "gobject". Please change all occurrences of "import gobject" to "from gi.repository import GObject". See: https://bugzilla.gnome.org/show_bug.cgi?id=709183
Run Code Online (Sandbox Code Playgroud)

任何建议或其他方式来做这个端口?

python gtk pygtk python-3.x pyobject

3
推荐指数
1
解决办法
1376
查看次数

标签 统计

gtk ×1

pygtk ×1

pyobject ×1

python ×1

python-3.x ×1