1、安装uwsig
先下载uwsgi,下载地址:http://uwsgi-docs.readthedocs.org/en/latest/Download.html
下载后解压缩,然后安装uwsgi:
pip install uwsgi
2、应用
新建python脚本test.py
def application(env, start_response): start_response('200 OK', [('Content-Type','text/html')]) return "Hello World"启用服务:
uwsgi --http :9090 --wsgi-file test.py打开浏览器 http://127.0.0.1:9090 测试正常。