no module named http.server

前端 未结 3 1359
南旧
南旧 2021-02-02 10:04

here is my web server class :

import http.server  
import socketserver

class WebHandler(http.server.BaseHTTPRequestHandler):

    def parse_POST(self):
                 


        
3条回答
  •  野性不改
    2021-02-02 10:52

    like @Sami said: you need earlier versions of python (2.7) - if you're running on Linux you need to "apt install python-minimal" - when launching the server "python2 -m SimpleHTTPServer 8082" [or any other port]. By default, python will launch it on 0.0.0.0 which actually is 127.0.0.1:8082 [or your specific port]

    Happy hacking

    PS when you have 2 versions of python, you need to specify every time you run a command, "python2" or "python3"

提交回复
热议问题