diff options
author | Andrew M. Kuchling <amk@amk.ca> | 2008-02-23 15:41:51 (GMT) |
---|---|---|
committer | Andrew M. Kuchling <amk@amk.ca> | 2008-02-23 15:41:51 (GMT) |
commit | b678f985113350e60e0121554939bbaacc1166e6 (patch) | |
tree | fe785b9309567f14b4e7989fd5916dd65d89cbac | |
parent | 080b094d2017433ea4f73b5de45c021735fc56b4 (diff) | |
download | cpython-b678f985113350e60e0121554939bbaacc1166e6.zip cpython-b678f985113350e60e0121554939bbaacc1166e6.tar.gz cpython-b678f985113350e60e0121554939bbaacc1166e6.tar.bz2 |
#2072: correct documentation for .rpc_paths
-rw-r--r-- | Doc/library/simplexmlrpcserver.rst | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Doc/library/simplexmlrpcserver.rst b/Doc/library/simplexmlrpcserver.rst index 65eed37..c788d55 100644 --- a/Doc/library/simplexmlrpcserver.rst +++ b/Doc/library/simplexmlrpcserver.rst @@ -120,7 +120,7 @@ alone XML-RPC servers. 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 @@ SimpleXMLRPCServer Example 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 |