[Tutor] Buffering in file.read()

Sandip Bhattacharya lists at sandipb.net
Thu May 8 17:40:29 CEST 2008


Suppose I need to
write a program which needs to parse lots of  binary files. This requires
multiple reads of small amounts of data. Obviously if I need to do this
very often, I need to do some kind of buffering to reduce IO.

My question is this - does Python have its own buffering while doing
file.read()? In that case, I can stop worrying about writing my own
buffering logic and just read like I desire.

- Sandip

-- 
Sandip Bhattacharya


More information about the Tutor mailing list