mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2025-12-22 23:00:08 +01:00
19 lines
395 B
Python
19 lines
395 B
Python
|
|
import dbus
|
||
|
|
|
||
|
|
import pygtk
|
||
|
|
import gtk
|
||
|
|
|
||
|
|
class SomeObject(dbus.Object):
|
||
|
|
def __init__(self, service):
|
||
|
|
dbus.Object.__init__(self, "/SomeObject", [self.HelloWorld], service)
|
||
|
|
|
||
|
|
def HelloWorld(self, hello_message):
|
||
|
|
print (hello_message)
|
||
|
|
return "Hello from example-service.py"
|
||
|
|
|
||
|
|
|
||
|
|
service = dbus.Service("org.designfu.SampleService")
|
||
|
|
object = SomeObject(service)
|
||
|
|
|
||
|
|
gtk.main()
|