#!/usr/home/sweetapp/bin/python

from DocXMLRPCServer import *

def mul(x,y):
    
"mul(4,10) => 40"
    
return x * y

def get_source_code():
    
"""get_source_code() => source code for this server"""

    
import sys
    
return open(sys.argv[0], 'r').read()

server = DocCGIXMLRPCRequestHandler()
server.register_introspection_functions()
server.register_multicall_functions()
server.register_function(pow)
server.register_function(lambda x,y: x+y, 'add')
server.register_function(mul)
server.register_function(get_source_code)
server.handle_request()

Download
The source was styled using SilverCity