The differences between Python2 and Python3 are:
Python2.x
The following code binds 8000
the port as the listening port
$ python -m SimpleHTTPServer 8000
Python3.x
The following code binds 8000
the port as the listening port and binds all interfaces by default.
$ python3 -m http.server 8000
If you want to bind a specific interface, such as local link loopback, you can add --bind
parameters
$ python3 -m http.server 8000 --bind 127.0.0.1