[Python-checkins] r60987 - python/trunk/Doc/library/simplexmlrpcserver.rst
andrew.kuchling
python-checkins at python.org
Sat Feb 23 16:41:52 CET 2008
Author: andrew.kuchling
Date: Sat Feb 23 16:41:51 2008
New Revision: 60987
Modified:
python/trunk/Doc/library/simplexmlrpcserver.rst
Log:
#2072: correct documentation for .rpc_paths
Modified: python/trunk/Doc/library/simplexmlrpcserver.rst
==============================================================================
--- python/trunk/Doc/library/simplexmlrpcserver.rst (original)
+++ python/trunk/Doc/library/simplexmlrpcserver.rst Sat Feb 23 16:41:51 2008
@@ -120,7 +120,7 @@
Registers the XML-RPC multicall function system.multicall.
-.. attribute:: SimpleXMLRPCServer.rpc_paths
+.. attribute:: SimpleXMLRPCRequestHandler.rpc_paths
An attribute value that must be a tuple listing valid path portions of the URL
for receiving XML-RPC requests. Requests posted to other paths will result in a
@@ -136,9 +136,15 @@
Server code::
from SimpleXMLRPCServer import SimpleXMLRPCServer
+ from SimpleXMLRPCServer import SimpleXMLRPCRequestHandler
+
+ # Restrict to a particular path.
+ class RequestHandler(SimpleXMLRPCRequestHandler):
+ rpc_paths = ('/RPC2',)
# Create server
- server = SimpleXMLRPCServer(("localhost", 8000))
+ server = SimpleXMLRPCServer(("localhost", 8000),
+ requestHandler=RequestHandler)
server.register_introspection_functions()
# Register pow() function; this will use the value of
More information about the Python-checkins
mailing list