机制的小鱼

博客园 首页 联系 订阅 管理
application.py

def hello(environ, start_response):
    start_response('200 OK', [('Content-Type', 'text/html')])
    return '<h1>Hello,WSGI!</h1>'
from wsgiref.simple_server import make_server
from application import hello
httpd = make_server('127.0.0.1', 8000, hello)
print "Serving HTTP on port 8000..."
httpd.serve_forever()

 

posted on 2019-08-29 10:28  机制的小鱼  阅读(404)  评论(0)    收藏  举报