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

Delta Between Two Patch Sets: Doc/library/wsgiref.rst

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
LEFTRIGHT
1 :mod:`wsgiref` --- WSGI Utilities and Reference Implementation 1 :mod:`wsgiref` --- WSGI Utilities and Reference Implementation
2 ============================================================== 2 ==============================================================
3 3
4 .. module:: wsgiref 4 .. module:: wsgiref
5 :synopsis: WSGI Utilities and Reference Implementation. 5 :synopsis: WSGI Utilities and Reference Implementation.
6 .. moduleauthor:: Phillip J. Eby <pje@telecommunity.com> 6 .. moduleauthor:: Phillip J. Eby <pje@telecommunity.com>
7 .. sectionauthor:: Phillip J. Eby <pje@telecommunity.com> 7 .. sectionauthor:: Phillip J. Eby <pje@telecommunity.com>
8 8
9 9
10 The Web Server Gateway Interface (WSGI) is a standard interface between web 10 The Web Server Gateway Interface (WSGI) is a standard interface between web
(...skipping 756 matching lines...) Expand 10 before | Expand all | Expand 10 after
767 start_response(status, headers) 767 start_response(status, headers)
768 768
769 # The returned object is going to be printed 769 # The returned object is going to be printed
770 return [b"Hello World"] 770 return [b"Hello World"]
771 771
772 with make_server('', 8000, hello_world_app) as httpd: 772 with make_server('', 8000, hello_world_app) as httpd:
773 print("Serving on port 8000...") 773 print("Serving on port 8000...")
774 774
775 # Serve until process is killed 775 # Serve until process is killed
776 httpd.serve_forever() 776 httpd.serve_forever()
LEFTRIGHT

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