I am trying to follow the answer to this question so that I can process HTTP GET input:
Processing HTTP GET input parameter on server side in python
but I get the error "self not defined" which makes sense because at no point is a function defined with self as a parameter. I'd assume that the person answering the question assumed that the context of the code they posted was understood by the person asking the question but this context is not clear to me.
here is the code from the question I linked above:
from urlparse import urlparse, parse_qs
query_components = parse_qs(urlparse(self.path).query)
imsi = query_components["imsi"]
# query_components = { "imsi" : ["Hello"] }
notice the use of "self" in query = urlparse(self.path).query
and parse_qs(urlparse(self.path).query)
I would like to know how to use this code provided, for example, if you could give a function using this code that I could copy into my program that would be sufficient or if you could provide an example of a fully function program that processes HTTP GET input in this way that would also be sufficient.
Thanks for the help