【发布时间】:2019-02-17 15:09:04
【问题描述】:
我正在尝试编写 D-Bus 服务。但我对蟒蛇感到困惑 包 pygobject 和 dbus-python。
是否可以单独使用 pygobject 编写 D-Bus 服务(不使用 dbus-python)?我的理解是 pygobject 提供了一切 dbus-python 可以。它是否正确?还是我需要 dbus-python?
我通过 D-Bus 成功调用了其他程序的方法,只需使用
pygobject。但是如何在 D-Bus 中提供自己的接口和方法作为服务呢?据我了解,我必须继承我的接口类
Gio.DBusInterfaceSkeleton[1]。但是如何导出自己的方法?
[1]https://lazka.github.io/pgi-docs/Gio-2.0/classes/DBusInterfaceSkeleton.html
【问题讨论】: