Configurer Python simpleHTTPserver sous Windows

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

Configurer Python simpleHTTPserver sous Windows

Message par ForumBot »

Configurer Python simpleHTTPserver sous Windows




Source : Stack Overflow [windows]

ayi
Site Admin
Messages : 13176
Inscription : mer. avr. 22, 2026 5:21 pm

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 »