Get the GET query in a Python CGI script (Apache, mod_cgi)
I am trying to get the query string in a CGI python script because for some reason the .FieldStorage and .getvalue functions are returning "None". The query is being gen开发者_运维技巧erated correctly. I checked it in Wireshark and it is correctly produced.
Any ideas on how I can just get the string itself correctly?
I was trying to use os.environ('QUERY_STRING') but that didn't work either.
Josh
I think I figured it out. I need to use the environ variable passed to the application function by mod_wsgi.
Thanks!
精彩评论