linux安装uwsgi后运行hello world测试用例不输出hello world

原因:测试用例对于python2.x 和 python3.x的写法不同。
python2.x请用一下用例测试:

def application(env, start_response):
    start_response('200 OK', [('Content-Type','text/html')])
    return "Hello World"

python3.x请用一下用例测试:

def application(env, start_response):
    start_response('200 OK', [('Content-Type','text/html')])
    return [b"Hello World"]

你可能感兴趣的:(异常积累)