The Following User Says Thank You to svs57 For This Useful Post: | ||
![]() |
2008-12-24
, 08:25
|
Posts: 207 |
Thanked: 31 times |
Joined on Apr 2008
|
#2
|
After last update it doesn't work.
Do anybody know what I need to change?
Thank's
#!/usr/bin/env python2.5
from dbus.mainloop.glib import DBusGMainLoop
DBusGMainLoop(set_as_default=True)
import dbus
import gobject
import os
dbus_loop = gobject.MainLoop()
bus = dbus.SessionBus()
def on_button_pressed (sender=None):
os.system('echo pause > /home/user/.kagu/fifo')
headset = bus.get_object('com.nokia.osso_hp_ls_controller', '/com/nokia/osso_hp_ls_controller')
headset_iface = dbus.Interface(headset, dbus_interface='com.nokia.osso_hp_ls_controller.he adset')
headset_iface.connect_to_signal('button_pressed', on_button_pressed, sender_keyword='sender')
dbus_loop.run()