I am trying to pass an argument to a python script via HTTP
e.g. http://www.domain.com/script.py?param=value
in some examples, I can see people using the cgi.FieldStorage() function to retrieve the GET parameters, but I cannot make it work
this is my code:
import cgi
print "Content-type: text/html\n"
arguments = cgi.FieldStorage()
print arguments
by making the http request either by the browser or via commandline with wget, this is the output I get for the object arguments:
FieldStorage(None, None, [])
which doesn't seem to store the GET parameter
what am I missing?
print "Content-Type: text/html\n\n"- and then check it again.