simplehttpserver

How to quiet SimpleHTTPServer?

How to quiet SimpleHTTPServer? Question: I have the following simple Threaded fileserver to be used by my application: class FileServer(Thread): “””Simple file server exposing the current directory for the thumbnail creator “”” def __init__(self, port): Thread.__init__(self) self.port = port Handler = SimpleHTTPServer.SimpleHTTPRequestHandler self.httpd = SocketServer.TCPServer((“”, port), Handler) def run(self): self.httpd.serve_forever() def stop(self): self.httpd.shutdown() How can …

Total answers: 3

What is the Python 3 equivalent of "python -m SimpleHTTPServer"

What is the Python 3 equivalent of "python -m SimpleHTTPServer" Question: What is the Python 3 equivalent of python -m SimpleHTTPServer? Asked By: ryanbraganza || Source Answers: The equivalent is: python3 -m http.server Answered By: Greg Hewgill From the docs: The SimpleHTTPServer module has been merged into http.server in Python 3.0. The 2to3 tool will …

Total answers: 7