From 9d0ab378067cd59e12a1ba2671c353e4a8bce356 Mon Sep 17 00:00:00 2001 From: Robert McQueen Date: Thu, 3 Nov 2005 16:13:53 +0000 Subject: 2005-11-03 Robert McQueen * python/_dbus.py, python/proxies.py, python/service.py: Add __repr__ functions to dbus.Bus, dbus.service.BusName and dbus.service.Object, tweak others to be consistent. * test/python/test-client.py: Tweak output of testInheritance. --- python/service.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'python/service.py') diff --git a/python/service.py b/python/service.py index 3809ca59..de68b614 100644 --- a/python/service.py +++ b/python/service.py @@ -28,6 +28,10 @@ class BusName: """Get the name of this service""" return self._named_service + def __repr__(self): + return '' % (self._named_service, self._bus, id(self)) + __str__ = __repr__ + def _dispatch_dbus_method_call(self, argument_list, message): """Calls method_to_call using argument_list, but handles exceptions, etc, and generates a reply to the DBus Message message @@ -280,3 +284,6 @@ class Object(Interface): return reflection_data + def __repr__(self): + return '' % (self._object_path, self._name, id(self)) + __str__ = __repr__ -- cgit