Below is the example code to test this problem that I have. The execution just stuck forever when calling testmaster.test() which is a method of the server remote object (actually not sure here it is server or client).
Even @Pyro4.callback doesn't help either (not sure if it is logical to be here) I am using Python 2.7.12 and Pyro4 How can I solve this problem, any help will be appreciated
#Run python -m Pyro4.naming in another terminal first:
import Pyro4
@Pyro4.expose
@Pyro4.callback
class Master:
@Pyro4.expose
@Pyro4.callback
def test(self):
print "this is test"
nameserver = Pyro4.locateNS('localhost', 9090)
deamon = Pyro4.Daemon()
uri = deamon.register(Master())
nameserver.register("Master", uri, safe=True)
testmaster=Pyro4.Proxy(uri)#Object of master to call some functions from it
print "before calling test" #this will be executed
testmaster.test()
print "after calling test" #but not this, it just stuck forever- how can I make it to be executed
deamon.requestLoop()