CGI question on input type=text form elements

DeepBlue DeepBlue at
Thu Oct 11 15:58:07 CEST 2001

I am running into a strange problem with a form while using CGI module in
Let us say I have the following form:
<input type="text" name="text_1">
<input type="submit" name="submit" value="test">

Now, let us say that test_form=cgi.FieldStorage()
If the above form is submitted without typing anything in the text field one
expects test_form.keys() to generate:

But i am getting:
['text_1', 'submit']
Which is unexpected, and in my case, undesirable.  What am I doing wrong?

More information about the Python-list mailing list