Looking for some Python dbus/hal help

Jesse Keating jkeating at j2solutions.net
Thu Mar 17 18:19:37 UTC 2005


I need to plug into hal through dbus in python a bit.  So I'm looking
for some good documentation that covers dbus and hal, specifically ways
to find hal entries for kernels and devices and such.

I've 'borrowed' some code from system-config-packages, namely:

    # get the devices from HAL
    bus = dbus.Bus (dbus.Bus.TYPE_SYSTEM)
    hal_service = bus.get_service ('org.freedesktop.Hal')
    hal_manager = hal_service.get_object
('/org/freedesktop/Hal/Manager', 'org.freedesktop.Hal.Manager')
    volume = hal_manager.FindDeviceStringMatch('volume.label', label)[0]
# Look for our disk label, return first one
    props = hal_service.get_object(volume,
"org.freedesktop.Hal.Device").GetAllProperties() # Get all the
properties of the volume

    mount = props['volume.mount_point'] # Get the mount point and return
it...

But I'm looking for alternatives to the 'FindDeviceStringMatch' and it's
friends.  Can anybody help out as I pour through the sources to these
modules?

-- 
Jesse Keating RHCE      (geek.j2solutions.net)
Fedora Legacy Team      (www.fedoralegacy.org)
GPG Public Key          (geek.j2solutions.net/jkeating.j2solutions.pub)
 
Was I helpful?  Let others know:
 http://svcs.affero.net/rm.php?r=jkeating




More information about the fedora-devel-list mailing list