Using CGI to interface with an XML-RPC server

Fredrik Lundh fredrik at pythonware.com
Wed Jan 18 10:53:10 EST 2006


Rob Cowie wrote:

> Is it possible to create python CGI scripts that accept form data in
> the usual way, package them as an XML-RPC request, call the server,
> receive the response then format this response into valid HTML to be
> emitted to the client?

Python ships with cgi and xmlrpc support (cgi and xmlrpclib, respectively),
so I'm not sure why you even think you have to ask...

    1. use cgi to parse form data
    2. use xmlrpclib to issue request
    3. use print or your favourite html templating library to generate
    output

(it might be a good idea to check with your web server admins, though,
to make sure they don't have a problem with outgoing HTTP requests)

</F>






More information about the Python-list mailing list