Pastebin

Paste #3800: simple http server

< previous paste - next paste>

Pasted by Anonymous Coward

Download View as text

import SimpleHTTPServer
import SocketServer

PORT = 80

Handler = SimpleHTTPServer.SimpleHTTPRequestHandler

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

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

New Paste


Do not write anything in this field if you're a human.

Go to most recent paste.