1 # Copyright (c) Twisted Matrix Laboratories.
2 # See LICENSE for details.
5 This example makes remote XML-RPC calls.
8 $ python xmlrpcclient.py
10 The example will make an XML-RPC request to advogato.org and display the result.
13 from twisted.web.xmlrpc import Proxy
14 from twisted.internet import reactor
16 def printValue(value):
20 def printError(error):
24 def capitalize(value):
26 proxy.callRemote('test.capitalize', 'moshe zadka').addCallbacks(printValue, printError)
28 proxy = Proxy('http://advogato.org/XMLRPC')
29 # The callRemote method accepts a method name and an argument list.
30 proxy.callRemote('test.sumprod', 2, 5).addCallbacks(capitalize, printError)