I was trying to get all of the variables posted to a python script added to a dictionary and was trying
[code lang=”python”]
form = cgi.FieldStorage()
[/code]
but it seems that you cannot use FieldStorage when using the publisher handler in mod_python. As the request variable req is always available, use the following.
[code lang=”python”]
styleArgs = {}
for k in req.form.keys():
styleArgs[k] = “‘”+req.form[k]+”‘”
[/code]
I couldn’t find any docs on this so I thought I’d post it.