# L-33 MCS 275 Mon 7 Apr 2008 : simplecgiserver.py

# After
# $ python simplecgiserver.py
# launch a browser at
# http://localhost:12345/uploadfile.html

from BaseHTTPServer import HTTPServer
from CGIHTTPServer import CGIHTTPRequestHandler

s = HTTPServer(('',12345),CGIHTTPRequestHandler)
try:
   print 'press ctrl c to stop server'
   s.serve_forever()
except KeyboardInterrupt:
   print ' ctrl c pressed, stopping server'
   s.socket.close()
