getfirst and re

Victor Subervi victorsubervi at gmail.com
Wed Jan 6 20:19:40 CET 2010


On Wed, Jan 6, 2010 at 3:09 PM, Carsten Haese <carsten.haese at gmail.com>wrote:

> Victor Subervi wrote:
> > I have an automatically generated HTML form from which I need to extract
> > data to the script which this form calls (to which the information is
> > sent).
>
> Ideally, the script that receives the submitted fields should know how
> the form was generated, so it knows what fields to expect. Failing that,
>  you should realize that getfirst() is not the only way to access the
> contents of a cgi.FieldStorage object.
>
> If you need to know the values of all fields whose names obey a certain
> pattern, I recommend you start with a list of all field names in the
> FieldStorage object and pick out the ones whose names obey that pattern.
> To get the list of field names, you should consider using the .keys()
> method of the FieldStorage object.
>

Cool. Thanks!
beno
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20100106/4c44f70a/attachment.html>


More information about the Python-list mailing list