I couldn’t find out python equivalent to PHP $_SERVER.
Is there any? Or, what are the methods to bring equivalent results?
Thanks in advance.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Using mod_wsgi, which I would recommend over mod_python (long story but trust me) … Your application is passed an environment variable such as:
And the environment contains typical elements from $_SERVER in PHP
And so on.
http://www.modwsgi.org/
Good Luck
REVISION
The real correct answer is use something like Flask