Python XML-RPC server as CGI

Brian Quinlan brian at sweetapp.com
Sat Feb 23 12:38:58 EST 2002


Victor wrote:
>   Hello:
> 
>   I'm using Python 2.1 I want to run an xmlrpc server as a python CGI
> script, executed via Apache: it is possible with the Python 2.1's
standard
> xmlrpc library?

Python 2.1 didn't include an XML-RPC library, so I'm presuming that you
are referring to the PythonWare module xmlrpclib?

I've placed an enhanced version of the Python 2.2 XML-RPC server library
on my website:
http://www.sweetapp.com/xmlrpc/


The documentation for the 2.2 version is the most up to date:
http://www.python.org/doc/current/lib/module-SimpleXMLRPCServer.html

Here is a simple CGI usage example:

from SimpleXMLRPCServer import CGIXMLRPCRequestHandler

server = CGIXMLRPCRequestHandler()
server.register_function(pow)
server.handle_request()

Cheers,
Brian





More information about the Python-list mailing list