Some newbie cgi form questions...

Robert Kern rkern at
Sun Aug 7 21:46:21 CEST 2005

Diez B.Roggisch wrote:
>>Traceback (most recent call last):
>>  File "/var/www/users/senta/html/gobooks/cgi/", line 35, in ?
>>    if not form.keys()[key]:
>>TypeError: list indices must be integers
>>As you can see,  I am using python 2.3 (my web service provider is
>>responsible for this - I'd use 2.4.1 if I could)
> That code above can't work - you want something like
> if not form.keys() in key:

This thread has to rank somewhere in the top ten threads with respect to 
the density of obviously wrong code samples.

Robert Kern
rkern at

"In the fields of hell where the grass grows high
  Are the graves of dreams allowed to die."
   -- Richard Harter

More information about the Python-list mailing list