En Tue, 29 Jan 2008 18:23:41 -0200, epsilon <[EMAIL PROTECTED]> escribi�:

> I'm running into trouble figuring this one out.  It seems that my
> decision routine is not working as intended.  Does anyone know why my
> output continues to utilize the "else" portion of the routine.
>
> tag_form = cgi.FieldStorage(keep_blank_values=True)
>
> #if not tag_form.has_key("fse00"):
> if tag_form["fse00"] == "":

tag_form["fse00"] is a FieldStorage instance, not a string. To get its  
value, use:

if tag_form["fse00"].value == ""
if tag_form.getvalue("fse00")==""
if tag_form.getfirst("fse00")==""

See http://docs.python.org/lib/module-cgi.html

-- 
Gabriel Genellina

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to