浏览代码

create chap-client.py with initial example code

master
dragonskills99 5 年前
父节点
当前提交
e748478314
共有 1 个文件被更改,包括 11 次插入0 次删除
  1. 11
    0
      chap-client.py

+ 11
- 0
chap-client.py 查看文件

@@ -0,0 +1,11 @@
#!/usr/bin/env python2

import xmlrpclib

s = xmlrpclib.ServerProxy('http://localhost:8000')
print s.pow(2,3) # Returns 2**3 = 8
print s.add(2,3) # Returns 5
print s.div(5,2) # Returns 5//2 = 2

# Print list of available methods
print s.system.listMethods()

正在加载...
取消
保存