def __write(self, s):
self.buf += s<EOL>while len(self.buf) > self.bufsize:<EOL><INDENT>self.fileobj.write(self.buf[:self.bufsize])<EOL>self.buf = self.buf[self.bufsize:]<EOL><DEDENT>
Write string s to the stream if a whole new block
           is ready to be written.