首页 > 其他 > 详细

openstack之wsgi

时间:2019-08-29 10:57:17      阅读:79      评论:0      收藏:0      [点我收藏+]
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()

 

openstack之wsgi

原文:https://www.cnblogs.com/i-10ve-cpic/p/11428217.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!