Re: [Tutor] Buffering in file.read()

2008-05-12 Thread Dave Kuhlman
Kent Johnson tds.net> writes: > > Footnote 2.3 says, "Specifying a buffer size currently has no effect > on systems that don't have setvbuf(). The interface to specify the > buffer size is not done using a method that calls setvbuf(), because > that may dump core when called after any I/O has be

Re: [Tutor] Buffering in file.read()

2008-05-08 Thread Kent Johnson
On Thu, May 8, 2008 at 1:40 PM, Dave Kuhlman <[EMAIL PROTECTED]> wrote: > On Thu, May 08, 2008 at 09:10:29PM +0530, Sandip Bhattacharya wrote: > Take a look at the optional "bufsize" argument to the "open" built-in > function: > > "The optional bufsize argument specifies the file's desired bu

Re: [Tutor] Buffering in file.read()

2008-05-08 Thread Dave Kuhlman
On Thu, May 08, 2008 at 09:10:29PM +0530, Sandip Bhattacharya wrote: > > 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 redu

[Tutor] Buffering in file.read()

2008-05-08 Thread Sandip Bhattacharya
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 f