server.register_function(adder_function, 'add')
# Register an instance; all the methods of the instance are
- # published as XML-RPC methods (in this case, just 'div').
+ # published as XML-RPC methods (in this case, just 'mul').
class MyFuncs:
- def div(self, x, y):
- return x // y
+ def mul(self, x, y):
+ return x * y
server.register_instance(MyFuncs())
Example::
class MyFuncs:
- def div(self, x, y) : return x // y
+ def mul(self, x, y):
+ return x * y
handler = CGIXMLRPCRequestHandler()