Python:同名的几个dbus方法。如何选择合适的?

时间:2013-02-09 22:23:26

标签: python methods dbus

好的,这可能很简单,但我被卡住了。

同名下有几种dbus方法。

$ qdbus org.kde.kmail /KMail | grep openComposer
method QDBusObjectPath org.kde.kmail.kmail.openComposer(QString to, QString cc, QString bcc, QString subject, QString body, bool hidden)
method int org.kde.kmail.kmail.openComposer(QString to, QString cc, QString bcc, QString subject, QString body, bool hidden, QString attachName, QByteArray attachCte, QByteArray attachData, QByteArray attachType, QByteArray attachSubType, QByteArray attachParamAttr, QString attachParamValue, QByteArray attachContDisp, QByteArray attachCharset, uint identity)
method int org.kde.kmail.kmail.openComposer(QString to, QString cc, QString bcc, QString subject, QString body, bool hidden, QString messageFile, QStringList attachmentPaths, QStringList customHeaders)

我的代码:

import dbus
bus = dbus.SessionBus()
msg = bus.get_object('org.kde.kmail', '/KMail')
msg.openComposer("huge bunch of arguments" , dbus_interface='org.kde.kmail.kmail')

如何更改它以使用此方法:

 method int org.kde.kmail.kmail.openComposer(QString to, QString cc, QString bcc, QString subject, QString body, bool hidden, QString messageFile, QStringList attachmentPaths, QStringList customHeaders)

0 个答案:

没有答案