annotate pythonServer-legacy.py @ 2140:14edd6b2557a

WAC2016 review updated PDF
author Nicholas Jillings <nickjillings@users.noreply.github.com>
date Thu, 25 Feb 2016 11:57:24 +0000
parents ade3acb0cee3
children
rev   line source
nickjillings@1303 1 import SimpleHTTPServer
nickjillings@1303 2 import SocketServer
nickjillings@1303 3
nickjillings@1303 4 PORT = 8080
nickjillings@1303 5
nickjillings@1303 6 Handler = SimpleHTTPServer.SimpleHTTPRequestHandler
nickjillings@1303 7
nickjillings@1303 8 httpd = SocketServer.TCPServer(("", PORT), Handler)
nickjillings@1303 9
nickjillings@1303 10 print "serving at port", PORT
nickjillings@1303 11 httpd.serve_forever()