Configurer Python simpleHTTPserver sous Windows

Clippy
Messages : 22157
Inscription : mer. 22 avr. 2026, 17:33

Configurer Python simpleHTTPserver sous Windows

Message par Clippy »

Configurer Python simpleHTTPserver sous Windows




Source : Stack Overflow [windows]

ayi
Site Admin
Messages : 9242
Inscription : mer. 22 avr. 2026, 17:21

Re: Configurer Python simpleHTTPserver sous Windows

Message par ayi »

D’apres la question Stack Overflow Quel est l’equivalent Python 3 de “python -m SimpleHTTPServer” :


SimpleHTTPServer est pour python2, c’est pourquoi vous obtenez l’erreur.


En python3, ce qui suit fonctionne :


python -m http.server [<portNo>]


Parce qu’en utilisant Python 3, le module SimpleHTTPServer a ete remplace par http.server, du moins sous Windows.

Répondre

Revenir à « Performance & Dépannage »