Pyrhon binding

Marcin marcino_l at o2.pl
Thu Mar 2 05:46:03 PST 2006


Hi,
It is posible to add method to existing interface?
For example, I have 3 classes:

import...

class ObjectService(dbus.service.Object):
	def __init__(self):
		dbus.service.Object.__init__(self, self.__createService(),  
'/com/ObjectService')

	def __createService(self):
		return dbus.service.BusName('com.ObjectService.Service',  
bus=dbus.SessionBus())

	@dbus.service.method('com.ObjectService.Interface')
	def methodS(self):
		print 'Hello from ObjectService class'


class WithinObject:
	def __init__(self):
		...

  	@dbus.service.method('com.ObjectService.Interface')
	def methodW(self):
		print 'Hello from WittinObject class ', WithinObject.serv

class Listener:
	def __init__(self):
		self.sevice = ObjectService()
		wobj = WithinObject()

If I creating object of calss WithinObject the object should add a method  
"methodW" do interface 'com.ObjectService.Interface', but it doesn't work.  
What should I do? How should the class WithinObject be written?

Thanks for help.

Marcin


-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/


More information about the dbus mailing list