开发者

Python 3 xmlrpc for remote objects

I am trying to implement a r开发者_如何学运维emote object implementation using xmlrpc, and python 3. I have tried the example at http://docs.python.org/3.1/library/xmlrpc.server.html?highlight=xmlrpc#simplexmlrpcserver-example, but it only works to and from localhost, how can I get it to work to and from internal IPs?


Update the localhost value to the following:

For the server : s = SimpleXMLRPCServer(("ServerIp", 8000))

For the client : s = xmlrpc.client.ServerProxy("http://ServerIp:8000/")


Perhaps I'm misunderstanding your question, but... Have you tried running the server code on another machine, and the client code (changing the 'localhost' value in the first line of the client code s = xmlrpc.client.ServerProxy('http://localhost:8000') to the IP address of the remote server?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜