view pythonServer.py @ 120:d6251c446b7f

Added new python2.py server. Currently as GET server. Rejects all but localhost access
author Nicholas Jillings <nicholas.jillings@eecs.qmul.ac.uk>
date Tue, 26 May 2015 15:00:40 +0100
parents 05327691d28c
children e08f2b155d8b
line wrap: on
line source
import SimpleHTTPServer
import SocketServer

PORT = 8080

Handler = SimpleHTTPServer.SimpleHTTPRequestHandler

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

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