Reputation: 73
I have seen passing a functions using teleport_function, is there any way to pass class methods ?? or can I execute my class object remotely in any other way
I can alternative work around by making class a service . But that does not serve completely my requirement in my project.
Upvotes: 2
Views: 642
Reputation: 107
import rpyc
from rpyc.utils.classic import teleport_function
def a(test):
print test
if __name__ = '__main__':
proxy = rpyc.classic.connect('remte.com')
launch_command_remote = teleport_function(proxy, a)
launch_command_remote("Voila") # Executed remotly
Upvotes: -1