Mega Code Archive

 
Categories / Python Tutorial / Network
 

Creating an XML-RPC Client

import xmlrpclib servAddr = "http://localhost:8080" s = xmlrpclib.ServerProxy(servAddr) methods = s.system.listMethods() for m in methods:     print m print "5 in. Square =", s.areaSquare(5) print "4x5 in. Rectangle =", s.areaRectangle(4,5) print "10 in. Circle =", s.areaCircle(5)