[Tutor] environment data
Sean 'Shaleh' Perry
Fri, 28 Dec 2001 18:50:35 -0800 (PST)
On 29-Dec-2001 Kirk Bailey wrote:
> ok, I want to read a environment variable in a script.
> This contains 'everything after the first "?" in the url' according to
> my reading.
> My application will have 1 word there.
> The url is
> where (listname) is replaced by a 1 word string, the name of the list of
> cgi module leaves me baffled, but if I can just read the bloddy
> environment variable I can run with it from there.
The cgi module for python passes os.environ as a parameter:
environ = os.environ
cgi.py is a lot like rfc822, it parses headers and other data storing them in a
dictionary and giving you access to them as if the returned item was a