#!/usr/bin/python import http.server import socketserver PORT = 8000 Handler = http.server.SimpleHTTPRequestHandler Handler.extensions_map.update({ '': 'text/html', }); httpd = socketserver.TCPServer(("", PORT), Handler) print("Serving at port", PORT) httpd.serve_forever()