xml-rpc module question
Scott Hathaway
slhath at home.com
Tue Dec 19 19:41:07 EST 2000
Chui,
Thanks for the response. When I try your suggested code, here is the error
I get:
C:\Projects\core>python core_client.py
Traceback (most recent call last):
File "core_client.py", line 5, in ?
print testing.CubeIt(3)
File "xmlrpclib.py", line 547, in __call__
return self.__send(self.__name, args)
File "xmlrpclib.py", line 627, in __request
response = self.__transport.request(
AttributeError: 'int' object has no attribute 'request'
Any ideas?
Scott
"Chui Tey" <teyc at bigfoot.com> wrote in message
news:91ooea$9qb$1 at bunyip.cc.uq.edu.au...
> 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