The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,860 other subscribers

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.