Python3での課題 PEP333(WSGI 1.0) であいまいな点が多い 特に文字コード、ユニコード関連 Python3ではbytesとstrの違いが明確になった。 WSGIでも明確に! -> PEP3333(WSGI 1.0.1) WSGIで行こう def hello(environ, start_response): start_response(['200 OK', ('Content-type', 'text/plain')]) return [b"Hello"] from wsgiref.simple_server import make_server httpd = make_server('', 8080, hello) httpd.serve_forever()

