On 14/03/2009 2:39 AM, Randy Syring wrote:
I have a Python script that interacts with Excel files through COM. In one section of the code, I do a loop that compares values:def find_row(self, sheet, needle, column, start=1, end=100): for x in range(start, end+1): if sheet.Range('%s%s' % (column, x)).Value == needle: return x raise ValueNotFound In build 212, this worked fine. However, with build 213, I am now getting the exception: ", line 170, in find_row if sheet.Range('%s%s' % (column, x)).Value == needle: TypeError: PyTime cannot be compared to other types
Ouch - that does look like a regression caused by the implementation of rich comparisons. For now you should just catch and ignore that error.
Cheers, Mark _______________________________________________ python-win32 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-win32
