The cgi module is no substitute for a dictionary.

Peter Hansen peter at engcorp.com
Tue Mar 30 19:11:28 EST 2004


Rob Landley wrote:

> <gripe>
> 
> cgi.FieldStorage() doesn't give me a dictionary.  Instead it gives me 
> something that pretends to be a dictionary, badly.
> 
> If it was a dictionary, I could print it and get a list the form entries sent 
> back to me.  When writing code to parse preprepared forms (such as a credit 
> card verification service returns), this is actually rather nice to be able 
> to do.
> 
> </gripe>

Check the source.  Maybe cgi.print_form() will do what you want.  If
not, it should be pretty easy to add the right thing.

-Peter



More information about the Python-list mailing list