mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-01-09 15:40:22 +01:00
17 lines
323 B
Python
17 lines
323 B
Python
|
|
import dbus
|
||
|
|
|
||
|
|
import pygtk
|
||
|
|
import gtk
|
||
|
|
|
||
|
|
class MyObject(dbus.Object):
|
||
|
|
def __init__(self):
|
||
|
|
service = dbus.Service("org.designfu.SampleService")
|
||
|
|
dbus.Object("/MyObject", [self.HelloWorld], service)
|
||
|
|
|
||
|
|
def HelloWorld(self, arg1):
|
||
|
|
print ("Hello World!: %s" % (arg1))
|
||
|
|
|
||
|
|
object = MyObject()
|
||
|
|
|
||
|
|
gtk.main()
|