def run(port=8080): server_address = ('localhost', DefaultPort) httpd = HTTPServer(server_address, EmscriptenDebugServerHandler) httpd.local_root = os.path.split(os.path.abspath(__file__))[0] httpd.alt_roots = DefaultAltRoots httpd.client_states = {} print('Starting http server at http://%s:%d' % server_address) print('Directories-to-serve: ') print(' %s' % httpd.local_root) for alt_root in httpd.alt_roots: print(' %s' % alt_root) print('') httpd.serve_forever()