python hal/dbus question
Jason Gerard DeRose
jderose at jasonderose.org
Thu Oct 13 12:46:15 PDT 2005
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
thanks! yes, this works great. i thought i tried this very thing
already, but i must have made a mistake somewhere.
back to understanding HAL...
cheers,
jason
John (J5) Palmieri wrote:
> On Mon, 2005-10-10 at 13:37 -0600, Jason Gerard DeRose wrote:
>
>>-----BEGIN PGP SIGNED MESSAGE-----
>>Hash: SHA1
>>
>>hello,
>>
>>i'm writing a python application that needs to respond to optical disc
>>insert/remove events, know what the disc type is, etc. i'm developing
>>against ubuntu breezy (hal 0.5.3, dbus 0.36.2).
>>
>>i'm trying to create a device proxy object from a udi, but the examples
>>i've found don't work with the current api. could someone provide (or
>>point me to) a quick example?
>>
>>i've attached a snippet from what i have working so far.
>>
>>much thanks!
>>
>>- -jason
>>
>
>
> udi_list = hal_manager.FindDeviceByCapability('storage.cdrom')
> for udi in udi_list:
> devobj = bus.get_object('org.freedesktop.Hal', udi)
> deviface = dbus.Interface(devobj, 'org.freedesktop.Hal.Device')
> deviface.connect_to_signal('PropertyModified', property_modified)
>
> That should work.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iQEVAwUBQ065hnqoeC9LR4KXAQI00gf/TEdbNRNq/wZ279kyrGimy3K84tYQnSLy
0dUz4n2pUN/KreWTlhAzN7NmSmHmyUfLDhKcWo9tbMVnlPm4Z8iyWarSffNWNA1M
K7kusS3LvCLDBhl9g7L4HEVpxMAbkIjfBOGutykqhQ6gmOpzAXBVQHb9A9Bhlzxb
Tz/KIFdDS2eQA15Spk4aaFmPR9rr1N/Wu7fQK17/QTdt7QoXZCPR2OT4QSuH3XCA
Laci4JgHjAUFggxmCi3FtT9j92rAc0c16AufJtrkWi7m9mFgvLqH0psYMYOjoSGW
yPnTYkC6AaX2F/l2sVsudyGD2r506Ny+fvJk8SJCPGEXKDA8QWtCAw==
=QgFl
-----END PGP SIGNATURE-----
More information about the hal
mailing list