SimpleHTTPServer.py
这个模块基于BaseHTTPServer。
This module builds on BaseHTTPServer by implementing the standard GET andHEAD requests in a fairly straightforward manner.
默认路径:
/usr/lib64/python2.7/SimpleHTTPServer.py
使用自带包SimpleServer
import SocketServer
import SimpleHTTPServer
PORT=8000
Handler=SimpleHTTPServer.SimpleHTTPRequestHandler
httpd=SocketServer.TCPServer(('',PORT),Handler)
print 'server at port',PORT
httpd.serve_forever()