User Tools

Site Tools


httpserver_python

Httpserver python

import SimpleHTTPServer
import SocketServer

PORT = 8000

Handler = SimpleHTTPServer.SimpleHTTPRequestHandler

httpd = SocketServer.TCPServer(("", PORT), Handler)

print "serving at port", PORT
httpd.serve_forever()

python -m SimpleHTTPServer 8000

httpserver_python.txt · Last modified: 2017/07/17 12:58 by jose