How to execute python script on the BaseHTTPSERVER created by python?

前端 未结 3 404
抹茶落季
抹茶落季 2020-12-16 08:43

I have simply created a python server with :

python -m SimpleHTTPServer

I had a .htaccess (I don\'t know if it is usefull with python serve

3条回答
  •  孤街浪徒
    2020-12-16 09:21

    You can use a simpler approach and use the --cgi option launching the python3 version of http server:

    python3 -m http.server --cgi
    

    as pointed out by the command:

    python3 -m http.server --help
    

提交回复
热议问题