Set up Python simpleHTTPserver on Windows

PythonWindowsPython 3.xSimplehttpserver

Python Problem Overview


I want to set up Python SimpleHTTPServer on Windows XP. I have Python installed on my computer. I am executing the following command:

python -m SimpleHTTPServer 8888

But I am getting the error:

C:\Python33\python.exe: No module named SimpleHTTPServer

Is SimpleHTTPServer for Python available on Windows? If yes, what do I do to set up the server?

Python Solutions


Solution 1 - Python

From Stack Overflow question https://stackoverflow.com/questions/7943751/what-is-the-python3-equivalent-of-python-m-simplehttpserver:

SimpleHTTPServer is for python2, so you're getting the error.

In python3, The following works:

python -m http.server [<portNo>]

Because using Python 3, the module SimpleHTTPServer has been replaced by http.server, at least in Windows.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestioncodeofnodeView Question on Stackoverflow
Solution 1 - PythoncodeofnodeView Answer on Stackoverflow