'Read at least one byte of cooked data unless EOF is hit.
Return \'\' if EOF is hit.  Block if no data is immediately
available.'

def read_some(self):

    self.process_rawq()
    while ((not self.cookedq) and (not self.eof)):
        self.fill_rawq()
        self.process_rawq()
    buf = self.cookedq
    self.cookedq = ''
    return buf
