No module named SimpleHTTPServer

I used to run this command to get a simple HTTP Server using Python:

$ python -m SimpleHTTPServer
/usr/bin/python: No module named SimpleHTTPServer

But as you can see it is not working anymore on Python3

Keep calm, there is another way:

$ python -m http.server
Serving HTTP on 0.0.0.0 port 8000 (http://0.0.0.0:8000/) …
192.168.0.15 - - [15/Nov/2021 18:02:22] "GET /test.db HTTP/1.0" 200 -

In fact the new way is better (easy to type)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s