mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2025-12-23 02:30:23 +01:00
* python/dbus.py: * python/examples/example-client.py: * python/examples/example-service.py: * python/examples/list-system-services.py: Add SessionBus, SystemBus and ActivationBus classes so you don't need to know the special little BUS_TYPE flag.
12 lines
348 B
Python
12 lines
348 B
Python
#!/usr/bin/env python
|
|
|
|
import dbus
|
|
|
|
bus = dbus.SessionBus()
|
|
remote_service = bus.get_service("org.designfu.SampleService")
|
|
remote_object = remote_service.get_object("/SomeObject",
|
|
"org.designfu.SampleInterface")
|
|
|
|
hello_reply = remote_object.HelloWorld("Hello from example-client.py!")
|
|
|
|
print (hello_reply)
|