开发者

Python 3 xmlrpc for remote objects

开发者 https://www.devze.com 2022-12-09 09:28 出处:网络
I am trying to implement a r开发者_如何学运维emote object implementation using xmlrpc, and python 3.

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

精彩评论

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