소스 검색

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()

Loading…
취소
저장