[Tutor] cgi.FieldStorage to int

Adam Cripps kabads at gmail.com
Wed Sep 21 20:44:49 CEST 2005


I'm trying to get a cgi.FieldStorage into an int.

The input is in numeric form, as it is provided by an <option>
drop-down box. However, when I try

timestable = int(form.getvalue('timestable'))

I get an error that the type is None - I guess this is because
FieldStorage is a class. However, I've trawled around trying to get
this field into an integer but without any luck.

Any pointers appreciated.
TIA
Adam
--
http://www.monkeez.org
PGP key: 0x7111B833


More information about the Tutor mailing list