4

我正在尝试使用 python-gdl(gdl 库的 python 绑定,它具有一些用于 gtk+2 的对接窗口)。甚至原始的 C gdl 本身也有详细的记录。它的 python 绑定似乎非常不稳定。你能推荐任何用 python-gdl 编写并且可以运行的示例程序吗?

我尝试使用 此处此处描述的那个,但它会因丑陋而失败:

Traceback (most recent call last):
  File "gdl_test.py", line 17, in <module>
    item1 = gdl.DockItem('item1', 'Item 1', gtk.STOCK_OPEN, gdl.DOCK_ITEM_BEH_NORMAL)
TypeError: Gdl.DockItem.__init__() takes at most 3 arguments (4 given)

python 绑定似乎甚至不提供构造函数签名:例如

>>> help(gdl.DockItem.__init__)
Help on wrapper_descriptor:

__init__(...)
    x.__init__(...) initializes x; see x.__class__.__doc__ for signature

>>> help(gdl.DockItem.__doc__)
no Python documentation found for "Object GdlDockItem\n\nSignals from GdlDockItem:\n  dock-drag-begin ()\n  dock-drag-motion (gint, gint)\n  dock-drag-end (gboolean)\n  selected ()\n\nProperties from GdlDockItem:\n  orientation -> GtkOrientation: Orientation\n
...more bloody mess here...

这个项目是否完全死了,只是用虚假的承诺来欺骗天真的程序员?

4

0 回答 0