Python3 的 CGIHTTPServer

时间:2015-01-31 02:04:20   收藏:0   阅读:584

在Python2.x版本里,/usr/bin/lib/python2.x/ 目录下会有 BaseHTTPServer.py, SimpleHTTPServer.py, CGIHTTPServer.py

但是在Python3.x里,就没有上面的3个文件,而是合闭到了 /usr/bin/python3.x/http/server.py文件里了。

在python2.x里启动CGI服务命令是:

$ python -m CGIHTTPServer 8080

在python3.x里则是:

$ python3.x -m http/server 8080

在3.x里,默认的服务RequestHandler是CGIHTTPRequestHandler。

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!