What are WSGI and CGI in plain English?

前端 未结 4 1928
孤城傲影
孤城傲影 2020-12-22 14:51

Every time I read either WSGI or CGI I cringe. I\'ve tried reading on it before but nothing really has stuck.

What is it really in plain English?

Does it j

4条回答
  •  别那么骄傲
    2020-12-22 15:37

    WSGI runs the Python interpreter on web server start, either as part of the web server process (embedded mode) or as a separate process (daemon mode), and loads the script into it. Each request results in a specific function in the script being called, with the request environment passed as arguments to the function.

    CGI runs the script as a separate process each request and uses environment variables, stdin, and stdout to "communicate" with it.

提交回复
热议问题