/usr/share/doc/pyro/examples/proxysharing/server.py is in pyro-examples 1:3.14-1.1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | #!/usr/bin/env python
import Pyro.core
import Pyro.naming
from Pyro.errors import NamingError
class RemoteObject(Pyro.core.ObjBase):
def __init__(self):
Pyro.core.ObjBase.__init__(self)
def method(self, arg):
return " ~~this is the remote result~~ "
ns=Pyro.naming.NameServerLocator().getNS()
daemon=Pyro.core.Daemon()
daemon.useNameServer(ns)
try:
ns.createGroup(":test")
except NamingError:
pass
uri=daemon.connect(RemoteObject(),":test.proxysharing")
print "Server is ready."
daemon.requestLoop()
|