我已经检查过这个链接:How to handle properties of a dbus interface with python。但是,它只列出了一个API。。。但我不知道那个API是从哪里来的。
我刚开始在python上使用dbus(对此非常兴奋,老实说,^只是对我找到的文档不太满意),我想知道是否可以获得一些示例代码。
我正在使用MPRIS专门为韵律盒,虽然它'应该'是相同的所有。
我知道我可以通过以下方法访问并享受乐趣:
import dbus
bus = dbus.SessionBus()
proxy = bus.get_object('org.mpris.MediaPlayer2.rhythmbox','/org/mpris/MediaPlayer2')
player = dbus.Interface(proxy, 'org.mpris.MediaPlayer2.Player')
playlists = dbus.Interface(proxy, 'org.mpris.MediaPlayer2.Playlists')
tracklist = dbus.Interface(proxy, 'org.mpris.MediaPlayer2.TrackList')
不过,我想知道有关财产的情况。一些示例代码就足够了:)谢谢!
找到了方法。
真的很简单:)我以为会这样简单。
相关问题 更多 >
编程相关推荐