BaseHTTPServer
from BaseHTTPServer import HTTPServer,BaseHTTPRequestHandler
class MyHttpHandler(BaseHTTPRequestHandler):
def do_GET(self):
path=self.path
print "path-> " + path
self.send_response(200)
self.send_header("Content-type", "text/html; charset=UTF-8")
content = open("index.html","r").read()
self.send_header("Content-Length", str(len(content)))
self.end_headers()
self.wfile.write(content)
httpd=HTTPServer(('',80),MyHttpHandler)
print("Server started port 80.....")
httpd.serve_forever()