xml-rpc module question

Fredrik Lundh fredrik at effbot.org
Tue Dec 19 19:36:05 EST 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)


More information about the Python-list mailing list