Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(4)

Delta Between Two Patch Sets: Lib/xmlrpc/server.py

Issue 26404: socketserver context manager
Left Patch Set: Created 3 years, 12 months ago
Right Patch Set: Created 3 years, 12 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« Doc/whatsnew/3.6.rst ('K') | « Lib/wsgiref/simple_server.py ('k') | no next file » | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 r"""XML-RPC Servers. 1 r"""XML-RPC Servers.
2 2
3 This module can be used to create simple XML-RPC servers 3 This module can be used to create simple XML-RPC servers
4 by creating a server and either installing functions, a 4 by creating a server and either installing functions, a
5 class instance, or by extending the SimpleXMLRPCServer 5 class instance, or by extending the SimpleXMLRPCServer
6 class. 6 class.
7 7
8 It can also be used to handle XML-RPC requests in a CGI 8 It can also be used to handle XML-RPC requests in a CGI
9 environment using CGIXMLRPCRequestHandler. 9 environment using CGIXMLRPCRequestHandler.
10 10
(...skipping 965 matching lines...) Expand 10 before | Expand all | Expand 10 after
976 server.register_function(lambda x,y: x+y, 'add') 976 server.register_function(lambda x,y: x+y, 'add')
977 server.register_instance(ExampleService(), allow_dotted_names=True) 977 server.register_instance(ExampleService(), allow_dotted_names=True)
978 server.register_multicall_functions() 978 server.register_multicall_functions()
979 print('Serving XML-RPC on localhost port 8000') 979 print('Serving XML-RPC on localhost port 8000')
980 print('It is advisable to run this example server within a secure, close d network.') 980 print('It is advisable to run this example server within a secure, close d network.')
981 try: 981 try:
982 server.serve_forever() 982 server.serve_forever()
983 except KeyboardInterrupt: 983 except KeyboardInterrupt:
984 print("\nKeyboard interrupt received, exiting.") 984 print("\nKeyboard interrupt received, exiting.")
985 sys.exit(0) 985 sys.exit(0)
LEFTRIGHT

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+