codeofnode codeofnode - 1 year ago 152
Python Question

Set up python simpleHTTPserver on Windows

I want to set up Python

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

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

Answer Source

From the link : What is the python3 equivalent of "python -m SimpleHTTPServer"

The following works for me:

python -m http.server [<portNo>]

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