2

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.

  • Show us your code. what error are you getting when trying to "teleport" a class method? – shx2 Feb 17 '15 at 17:03

1 Answers1

-1
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
user2563547
  • 107
  • 2
  • 8
  • Please consider editing your post to add more explanation about what your code does and why it will solve the problem. An answer that mostly just contains code (even if it's working) usually wont help the OP to understand their problem. – SuperBiasedMan Sep 09 '15 at 16:10
  • Your example shows how to teleport a function not a method – CodeSamurai777 Nov 13 '18 at 14:15