python web 测试CGI脚本

1、启动一个web服务器,并运行(下面五行缺一不可)

from http.server import HTTPServer, CGIHTTPRequestHandler

port = 8080

httpd = HTTPServer(('', port), CGIHTTPRequestHandler)
print("Starting simple_httpd on port: " + str(httpd.server_port))
httpd.serve_forever()

2、加载Kelly教练的主页来运行Web应用

posted @ 2017-08-30 21:22  dang幸福来敲门  阅读(272)  评论(0)    收藏  举报