Python的xmlrpc库用于使用XML-RPC协议实现远程过程调用(RPC)。下面是基本用法:
-
导入库:
import xmlrpc.client
-
连接服务器:
server = xmlrpc.client.ServerProxy("http://localhost:8000/")
-
调用服务器的函数
result = server.some_function
Python的xmlrpc库用于使用XML-RPC协议实现远程过程调用(RPC)。下面是基本用法:
导入库:
import xmlrpc.client
连接服务器:
server = xmlrpc.client.ServerProxy("http://localhost:8000/")
调用服务器的函数
result = server.some_function