Python xmlrpc servers?

Jaime Wyant programmer.py at gmail.com
Wed Dec 1 14:59:48 EST 2004


Mark Pilgrim wrote a really neat piece of python code that did XML-RPC
over CGI.  It seems to have disappeared from his website, though
(http://diveintomark.org/public/webservices.txt).

If you can't dig it up, I have a working copy that I use.  I'll post
it / email it if you want.

jw


On Wed, 1 Dec 2004 13:26:21 -0600, Skip Montanaro <skip at pobox.com> wrote:
>     ted> The only other real question is what about the cgi servers?  I'd
>     ted> assume I'd take the example given:
> 
>     ted> class MyFuncs:
>     ted>     def div(self, x, y) : return div(x,y)
> 
>     ted> handler = CGIXMLRPCRequestHandler()
>     ted> handler.register_function(pow)
>     ted> handler.register_function(lambda x,y: x+y, 'add')
>     ted> handler.register_introspection_functions()
>     ted> handler.register_instance(MyFuncs())
>     ted> handler.handle_request()
> 
>     ted> Stuff that into a file in the cgi-bin dir on the server, and then
>     ted> try to use something like:
> 
>     ted> server = xmlrpclib.Server("http://192.168.1.102/testserver.py")
>     ted> or
>     ted> server = xmlrpclib.Server("http://192.168.1.102/cgi-bin/testserver.py")
> 
>     ted> That still hasn't worked, so far at least.
> 
> I've never used XML-RPC in a CGI context before.  Have you looked in your
> web server's error log file?
> 
> Skip
> 
> 
> --
> http://mail.python.org/mailman/listinfo/python-list
>



More information about the Python-list mailing list