new_contents: import time
  import BaseHTTPServer
  
  
  HOST = 'localhost' # set you host
  PORT = 31337 # set your port
  
  
  class Server(BaseHTTPServer.BaseHTTPRequestHandler):
  
      def do_HEAD(s):
          s.send_response(200)
          s.send_header("Content-type", "text/html")
          s.end_headers()
  		
      def do_GET(s):
          s.send_response(200)
          s.send_header("Content-type", "text/html")
          s.end_headers()
          s.wfile.write("<html><head><title>Titles.</title></head>")
          s.wfile.write("<body><p>and stuff.</p>")
          s.wfile.write("</body></html>")
  
  if __name__ == '__main__':
      server_class = BaseHTTPServer.HTTPServer
      httpd = server_class((HOST, PORT), Server)
      print time.asctime(), "Server On - %s:%s" % (HOST, PORT)
      try:
          httpd.serve_forever()
      except KeyboardInterrupt:
          pass
      httpd.server_close()
      print time.asctime(), "Server Off - %s:%s" % (HOST, PORT)
  
subject: Create BaseHTTPServer1.py