Reads the current state of the buffer and returns a string those
        contents

        :return:
            A string for the current state of the print buffer contents
333284
def read_all(self) -> str:
        
        try:
            buffered_bytes = self.bytes_buffer.getvalue()
            if buffered_bytes is None:
                return ''

            return buffered_bytes.decode(self.source_encoding)
        except Exception as err:
            return 'Redirect Buffer Error: {}'.format(err)
399507
def dump(self):
        

        reading = self.reading
        if reading is not None:
            reading = reading.asdict()

        return {
            u'selector': str(self.selector),
            u'reading': reading
        }
1230229
def readline(self):
        
        content = {"session_id": self._session}
        prompt_msg = self._herald.send(
            self._peer, beans.Message(MSG_CLIENT_PROMPT, content))
        if prompt_msg.subject == MSG_SERVER_CLOSE:
            # Client closed its shell
            raise EOFError

        return prompt_msg.content
771394
def get_cont_state(self, string, backward=False):
        
        if string is None:
            return ()
        for _ in self.parser(self.scanner(string, True), True):
            if backward and len(self.parser.state[0]):
                break
        state = tuple(self.parser.state)
        self.scanner.reset()
        self.parser.reset()
        return state
490409
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
552922
def content(self):
        
        if not self._content:

            self._content = self._read()

        return self._content
1181106
def get_output_from_input(self):
        
        input_path = self.layer.currentLayer().source()
        output_path = (
            os.path.splitext(input_path)[0] + '_multi_buffer'
            + os.path.splitext(input_path)[1])
        self.output_form.setText(output_path)
96391
def _read_stdout(self):
        
        output = self._decode(self._process.readAllStandardOutput().data())
        if self._formatter:
            self._formatter.append_message(output, output_format=OutputFormat.NormalMessageFormat)
        else:
            self.insertPlainText(output)
1193386
def read_bytes(self):
		
		global exit_flag

		for self.i in range(0, self.length) :
			self.bytes[self.i] = i_max[self.i]
			self.maxbytes[self.i] = total_chunks[self.i]
			self.progress[self.i]["maximum"] = total_chunks[self.i]
			self.progress[self.i]["value"] = self.bytes[self.i]
			self.str[self.i].set(file_name[self.i]+ "       " + str(self.bytes[self.i]) 
								  + "KB / " + str(int(self.maxbytes[self.i] + 1)) + " KB")

		if exit_flag == self.length:
			exit_flag = 0
			self.frame.destroy()
		else:
			self.frame.after(10, self.read_bytes)
1321489
def _read(self):
        
        line = ''
        finished = False
        while not finished:
            char = self._socket.recv(1)
            if char == '':
                return ''
            elif char == '\r':
                continue
            elif char == '\n':
                finished = True
                continue
            else:
                line = line + char
        logger.debug('Server sent: ' + line.rstrip())
        return line
238317
def readLine(self):
        
        if self.buf is None:
            self.buf = []

        # Buffer may already have a line if we've received unilateral
        # response(s) from the server
        if len(self.buf) == 1 and b"\n" in self.buf[0]:
            (line, b) = self.buf[0].split(b"\n", 1)
            self.buf = [b]
            return line

        while True:
            b = self.readBytes(4096)
            if b"\n" in b:
                result = b"".join(self.buf)
                (line, b) = b.split(b"\n", 1)
                self.buf = [b]
                return result + line
            self.buf.append(b)
1332774
def current_state_str(self):
        """"""
        if self.sample_ok:
            msg = ''
            temperature = self._get_value_opc_attr('temperature')
            if temperature is not None:
                msg += 'Temp: %s ºC, ' % temperature
            humidity = self._get_value_opc_attr('humidity')
            if humidity is not None:
                msg += 'Humid: %s %%, ' % humidity
            pressure = self._get_value_opc_attr('pressure')
            if pressure is not None:
                msg += 'Press: %s mb, ' % pressure
            light_level = self._get_value_opc_attr('light_level')
            if light_level is not None:
                msg += 'Light: %s lux, ' % light_level
            return msg[:-2]
        else:
            return "Bad sample"
803698
def read_string(self, advance=True):
        
        target = self._blob.find(b'\0', self.pos)
        assert target >= self._pos
        data = self._blob[self._pos:target]
        if advance:
            self._pos = target + 1
        return data.decode('ascii')
457950
def read_stdin(self):
        
        text = sys.stdin.read()

        # Decode the bytes returned from earlier Python STDIN implementations
        if sys.version_info[0] < 3 and text is not None:
            text = text.decode(sys.stdin.encoding or 'utf-8')

        return text
616998
def _get_current_output(self):
        
        output = []
        for item in self.items:
            out = self.py3.get_output(item)
            if out and "separator" not in out[-1]:
                out[-1]["separator"] = True
            output += out
        return output
986019
def get_current_state(self):
        
        try:
            session_id = session.sessionId
            return self.session_machines.current_state(session_id)
        except UninitializedStateMachine as e:
            logger.error(e)
376489
def print_contents(self):
        
        print "\t\t\t".join(self.columns)
        temp_list = []
        for i in self.columns:
            temp_list.append(self.get_column(i))
        for i in zip(*(temp_list)):
            print "\t\t\t".join(map(str, i))