On Fri, 09 Jan 2009 09:15:20 +0000, Marc 'BlackJack' Rintsch wrote:
>> picture = { }
>> havepixels = 0
>> while True:
>> data = f.read(blocksize)
>> if len(data) <= 0: break
>
> if data:
> break
>
> is enough.You've reversed the sense of the test. The OP exits the loop when data is empty, you exit the loop when it *isn't* empty. -- Steven -- http://mail.python.org/mailman/listinfo/python-list
