擅长:python、mysql、java
<p>我最近遇到了同样的问题(不是和哈尔特别)。我不确定这是否普遍适用,但它可以(至少经常)通过<code>org.freedesktop.DBus.Properties</code>接口(正如@daf建议的那样)检索。</p>
<pre><code>bus = dbus.SystemBus()
device = bus.get_object(...)
your_interface = 'org.freedesktop.Hal.Device' # for this example
props_iface = dbus.Interface(device, 'org.freedesktop.DBus.Properties')
properties = props_iface.GetAll(your_interface) #properties is a dbus.Dictionary
</code></pre>