0

I'm very inexpert at this but when I use on different projects:

python -m http.server

a project answers with:

Serving HTTP on :: port 8000 (http://[::]:8000/) ...

the other with:

Serving HTTP on 0.0.0.0 port 8000 (http://0.0.0.0:8000/) ...

I visit the pages on:

http://localhost:8000/

it works in either cases but there is a difference?

The projects are simply sphinx documents (I use miniconda on windows, different version of python and sphinx but the configuration should be almost the same). The sys.path has the same shape. Sorry but I have no idea what you need to know, so ask me.

Thank you

FlyingTeller
  • 17,638
  • 3
  • 38
  • 53
fabio
  • 1,210
  • 2
  • 26
  • 55
  • 2
    [::] is for ipv6 and 0.0.0.0 is for ipv4. Both means bind 8000 on all interfaces. – tbhaxor Aug 11 '22 at 10:41
  • @tbhaxor thank you, but like I said I'm ignorant on this, so what? Should I ignore the difference? – fabio Aug 11 '22 at 11:51
  • 2
    Yes, you should. Basically the http.server module prioritize ipv6 if available otherwise go for ipv4. – tbhaxor Aug 11 '22 at 11:57
  • Are both projects run on the same computer? There probably is a difference in python versions between the two? – FlyingTeller Aug 12 '22 at 09:14
  • @FlyingTeller Yes, they are on the same pc but they use different python (and sphinx) versions installed on different conda environments. – fabio Aug 12 '22 at 10:30

0 Answers0