code: def read_some(self):
          
          self.process_rawq()
          while self.cookedq.tell() == 0 and not self.eof:
              self.fill_rawq()
              self.process_rawq()
          buf = self.cookedq.getvalue()
          self.cookedq.seek(0)
          self.cookedq.truncate()
          return buf
docs: Read at least one byte of cooked data unless EOF is hit.
  
          Return '' if EOF is hit.  Block if no data is immediately
          available.