#!/usr/bin/env python # encoding: utf-8 # # Copyright (c) 2008 Doug Hellmann All rights reserved. # """ """ __version__ = "$Id$" #end_pymotw_header from SimpleXMLRPCServer import SimpleXMLRPCServer server = SimpleXMLRPCServer(('localhost', 9000)) def my_function(a, b): return a * b server.register_function(my_function, 'multiply args') try: print 'Use Control-C to exit' server.serve_forever() except KeyboardInterrupt: print 'Exiting'