check to see if value can be an integer instead of string

nephish at xit.net nephish at xit.net
Wed Jan 18 07:23:17 EST 2006


it isn't really that i will want to change it to an integer anyway. the
script uses a table to reference a value to a key, if the key is a
group of letters, that code tells the script to do something. if the
value is a number, it means an equipment failure. The thing is, all the
values come out as strings (they are read from a text file).
so what you put first with the try/except looks like my best answer.

thanks,
shawn




More information about the Python-list mailing list