On Sep 22, 2005, at 3:34 PM, Kirk Durston wrote: After spending a couple hours trying to figure out what is going on, I’m asking for help. Sounds like you're comparing a float and a string. Don't do that, make sure that temp and cutoff are both float if you expect a meaningful comparison. To convert a string to a float, use float(aString). To see the "programmer representation" of a variable, use the %r format string, or the repr() function. E.g.: print 'temp is', repr(temp) or print 'cutoff is %r' % (Cutoff,) Using programmer repr[esentations] for debugging is essential, the string representations of types can be (intentionally) ambiguous. One of the two is almost definitely a string, so you should do temp = float(temp) or similar. -bob |
_______________________________________________ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig