xml-rpc module question

Chui Tey teyc at bigfoot.com
Tue Dec 19 23:43:47 CET 2000


Not tested code:

from xmlrpcserver import RequestHandler

class my_handler(RequestHandler):

    def CubeIt(self, x):
        return x ** 3

    def call(self, method, params):
        if method == 'CubeIt':
            return self.CubeIt( params[0] )

if __name__ == '__main__':
    server = SocketServer.TCPServer(('', 8000), my_handler)
    server.serve_forever()


Chui








More information about the Python-list mailing list