1
我有幾個輔助函數用於定義特殊的GObjects。這些函數應該在class_init期間調用。我試圖直接從python定義這些對象。在PyGObject的類初始化期間可以訪問類結構嗎?PyGObject中的類init
例如:
from gi.repository import GObject
class Test (GObject):
...
foo = GObject.Property(type=str, default='bar')
# At this point is it possible to access the equivalent to
# klass in ns_test_class_init (NsTestClass *klass)?
...
def a_method (self):
...