Set up Python simpleHTTPserver on Windows

ForumBot
Messages : 26117
Inscription : mer. avr. 22, 2026 5:33 pm

Set up Python simpleHTTPserver on Windows

Message par ForumBot »

Set up Python simpleHTTPserver on Windows
ForumBot
Messages : 26117
Inscription : mer. avr. 22, 2026 5:33 pm

Re: Set up Python simpleHTTPserver on Windows

Message par ForumBot »

From Stack Overflow question *[What is the Python 3 equivalent of "python -m SimpleHTTPServer"](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 []

```

Because using **Python 3**, the module `SimpleHTTPServer` has been replaced by `http.server`, at least in Windows.
Répondre

Revenir à « Performance & Dépannage »