I want to export a function via RPC. Therefore I use Pyro4 for Python. This works so far. Now I want that function to work also on the data the belong to the RPC-Server. Is this possible? If so, how?
#!/usr/bin/env python3
import Pyro4
import myrpcstuff
listIwantToWorkWith=["apples","bananas","oranges"]
rcpthing=myrpcstuff.myrpcFunction()
daemon=Pyro4.Daemon()
uri=daemon.register(rpcthing)
daemon.requestLoop()
What do I have to write in myrpcstuff.myrpcFunction() to access listIwantToWorkWith, or do I have to mark the list global?