(2018-04-15.Python从Zero到One)四、web服务器案例__4.1.7应用程序示例

上一篇文章为:→4.1.6Web动态服务器-1-基本实现

应用程序示例

import time

def app(environ, start_response):
    status = '200 OK'
    response_headers = [('Content-Type', 'text/plain')]
    start_response(status, response_headers)
    return [str(environ)+'==Hello world from a simple WSGI application!--->%s\n'%time.ctime()]

下一篇文章为:→4.1.8Web动态服务器-2-传递数据给应用

你可能感兴趣的:((2018-04-15.Python从Zero到One)四、web服务器案例__4.1.7应用程序示例)