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.

chap-client.py 281B

1234567891011
  1. #!/usr/bin/env python2
  2. import xmlrpc.client
  3. s = xmlrpc.client.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() )