What is the Python 3 equivalent of “python -m SimpleHTTPServer” – Stack Overflow
Posted by jpluimers on 2025/05/29
Now that Python 2 has been dead for long enough (has it been unsupported for 5 years? yes it has: [Wayback/Archive] Status of Python Versions), it was finally time to change my alias for running a local web-server to serve files from a directory (:
So, from [Wayback/Archive] What is the Python 3 equivalent of “python -m SimpleHTTPServer” – Stack Overflow (thanks [Wayback/Archive] ryanbraganza, [Wayback/Archive] k.avinash and [Wayback/Archive] Petr Viktorin):
python -m http.server 8000, it will start the server on port 8000
Docs with the migration hints: [Wayback/Archive] 20.19. SimpleHTTPServer — Simple HTTP request handler — Python 2.7.18 documentation
New docs: [Wayback/Archive] http.server — HTTP servers — Python 3.11.0 documentation
Via [Wayback/Archive] “python -m SimpleHTTPServer” – Google Search
–jeroen






Leave a comment