#!/usr/bin/env python3 import http.server, socketserver, os PORT = 8080 os.chdir(os.path.dirname(os.path.abspath(__file__))) class Handler(http.server.SimpleHTTPRequestHandler): def log_message(self, fmt, *args): pass socketserver.TCPServer.allow_reuse_address = True with socketserver.TCPServer(('', PORT), Handler) as httpd: print(f'Serving on http://localhost:{PORT}') httpd.serve_forever()