I want to call an undefined method, but it is defined in Pyro Daemon.
For example, we have the class Sender
without method publish
, and I used __getattr__
for call undefined method.
For example:
class Sender:
...
def __getattr__(self, name):
def method(*args):
"""
for example name = publish and I want to call method self.proxy.publish
"""
self.call_if_connected(lambda: self.proxy.name(args))
return method
Sender.publish()
What do I need to do?