xml-rpc module question

Fredrik Lundh fredrik at effbot.org
Wed Dec 20 01:36:05 CET 2000


Scott Hathaway wrote:
> I made the changes you suggested, but I am still having trouble.

what trouble?

jeff's example (based on your code) isn't syntactically
correct, but you should at least get a SyntaxError.

if that's what happens, try identing the offending line:

import xmlrpcserver
import SocketServer

class myRequestHandler(xmlrpcserver.RequestHandler):

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

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

server = SocketServer.TCPServer(('', 8000), myRequestHandler)
server.serve_forever()

</F>





More information about the Python-list mailing list