Some python scrips for demonstrating chap protocol
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1234567891011
  1. #!/usr/bin/env python2
  2. import xmlrpclib
  3. s = xmlrpclib.ServerProxy('http://localhost:8000')
  4. print s.pow(2,3) # Returns 2**3 = 8
  5. print s.add(2,3) # Returns 5
  6. print s.div(5,2) # Returns 5//2 = 2
  7. # Print list of available methods
  8. print s.system.listMethods()