[EMAIL PROTECTED] wrote:
> I think this is what you want:
> 
> file = open(r'c:/test.txt','r')
> 
> c = file.read(3)
> while c:
>     print c
>     c = file.read(3)
> 
> file.close();


Or:

     def read3():
         return file.read(3)
     for chars in iter(read3, ''):
         ... do something with chars ...

STeVe
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to