Python 3.x BaseHTTPServer or http.server

后端 未结 4 1031
一向
一向 2021-01-30 12:26

I am trying to make a BaseHTTPServer program. I prefer to use Python 3.3 or 3.2 for it. I find the doc hard to understand regarding what to import but tried changing the import

4条回答
  •  后悔当初
    2021-01-30 13:24

    Whoever did the python 3 documentation for http.server failed to note the change. The 2.7 documentation states right at the top "Note The BaseHTTPServer module has been merged into http.server in Python 3. The 2to3 tool will automatically adapt imports when converting your sources to Python 3."

提交回复
热议问题