dbus/python/examples example-client.py, 1.2, 1.3 example-service.py, 1.2, 1.3 list-system-services.py, 1.1, 1.2

Seth Nickell seth at pdx.freedesktop.org
Sat May 29 15:37:15 PDT 2004


Update of /cvs/dbus/dbus/python/examples
In directory pdx:/tmp/cvs-serv22104/python/examples

Modified Files:
	example-client.py example-service.py list-system-services.py 
Log Message:
2004-05-29  Seth Nickell  <seth at gnome.org>

	* 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.


Index: example-client.py
===================================================================
RCS file: /cvs/dbus/dbus/python/examples/example-client.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- a/example-client.py	30 Sep 2003 02:41:13 -0000	1.2
+++ b/example-client.py	29 May 2004 22:37:13 -0000	1.3
@@ -2,7 +2,7 @@
 
 import dbus
 
-bus = dbus.Bus()
+bus = dbus.SessionBus()
 remote_service = bus.get_service("org.designfu.SampleService")
 remote_object = remote_service.get_object("/SomeObject",
                                           "org.designfu.SampleInterface")

Index: example-service.py
===================================================================
RCS file: /cvs/dbus/dbus/python/examples/example-service.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- a/example-service.py	30 Sep 2003 02:41:13 -0000	1.2
+++ b/example-service.py	29 May 2004 22:37:13 -0000	1.3
@@ -11,8 +11,8 @@
         print (hello_message)
         return "Hello from example-service.py"
 
-
-service = dbus.Service("org.designfu.SampleService")
+session_bus = dbus.SessionBus()
+service = dbus.Service("org.designfu.SampleService", bus=session_bus)
 object = SomeObject(service)
 
 gtk.main()

Index: list-system-services.py
===================================================================
RCS file: /cvs/dbus/dbus/python/examples/list-system-services.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- a/list-system-services.py	28 May 2004 02:52:23 -0000	1.1
+++ b/list-system-services.py	29 May 2004 22:37:13 -0000	1.2
@@ -3,7 +3,7 @@
 import dbus
 
 # Get a connection to the SYSTEM bus
-bus = dbus.Bus(dbus.Bus.TYPE_SYSTEM)
+bus = dbus.SystemBus()
 
 # Get the service provided by the dbus-daemon named org.freedesktop.DBus
 dbus_service = bus.get_service('org.freedesktop.DBus')




More information about the dbus-commit mailing list