xmlrpc组件(python2和3)
xmlrpccomp的Python项目详细描述
xmlrpc组件
xmlrpc python2和python3
用法
服务器
from xmlrpccomp import RpcServer
>>> def hello():
... return 'hello'
...
>>> server = RpcServer(('localhost', 5000))
>>> server.register_function(hello, 'hello')
>>> server.serve_forever()
客户
>>> from xmlrpccomp import RpcClient
>>> client = RpcClient('http://localhost:5000')
>>> client.hello()
'hello'