How do I prevent a python server from writing to the terminal window?

I need to run a Python web server, while still taking inputs from the user, but when someone visits the website, the information logged to the terminal window is on the same line as the input, making it look like this:enter image description here

I’ve tried setting the thread the the servers on to daemon mode, I’ve tried logging.getLogger("socketserver").setLevel(logging.CRITICAL), I’ve tried logger.propagation = False, and logger.disable = True

This is my server code:

os.chdir("docs") port = 8980 Handler = http.server.SimpleHTTPRequestHandler with socketserver.TCPServer(("", port), Handler) as httpd:    httpd.serve_forever()