Lately I've been playing with Python to discover its potential and I've just stumbled upon SimpleHTTPServer.
I'm on Windows 10.
I run:
python -m SimpleHTTPServer
the output is:
Serving HTTP on 0.0.0.0 port 8000 ...
I've opened the browser both on smartphone and tablet, but none of them can connect to the server when I type "http://127.0.0.1:8000".
(Translating from italian, maybe is not the exact translation)
iPad: "Safari can't open the page because the server has stopped responding"
Android: "WebPage does not respond. the webpage may be temporarily not available or it could have been moved to another address"
Why does it not work? How do I fix this?
Maybe your firewall is blocking access to python based server
Try this:
It should work now
127.0.0.1 is always the IP address of the local system (its associated hostname is "localhost"). In other words, if you type 127.0.0.1:8000 on your tablet or Android device, the browser on that device will try to connect to a server running on the same device, listening on port 8000. You'll need to find out the IP address of the computer you're running Python on, and type that instead. You can use the ifconfig command on Unix, or ipconfig on Windows.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With