class_docstr: Wrapper around stdin which reads (nonblocking) the next available 1024
  bytes and decodes it.
  
  Note that you can't be sure that the input file is closed if the ``read``
  function returns an empty string. When ``errors=ignore`` is passed,
  ``read`` can return an empty string if all malformed input was replaced by
  an empty string. (We can't block here and wait for more input.) So, because
  of that, check the ``closed`` attribute, to be sure that the file has been
  closed.
  
  :param stdin_fd: File descriptor from which we read.
  :param errors:  Can be 'ignore', 'strict' or 'replace'.
      On Python3, this can be 'surrogateescape', which is the default.
  
      'surrogateescape' is preferred, because this allows us to transfer
      unrecognised bytes to the key bindings. Some terminals, like lxterminal
      and Guake, use the 'Mxx' notation to send mouse events, where each 'x'
      can be any possible byte.
docstr: Read the input and return it as a string.
  
  Return the text. Note that this can return an empty string, even when
  the input stream was not yet closed. This means that something went
  wrong during the decoding.
docstr_tok: ["Read","the","input","and","return","it","as","a","string",".","Return","the","text",".","Note","that","this","can","return","an","empty","string",",","even","when","the","input","stream","was","not","yet","closed",".","This","means","that","something","went","wrong","during","the","decoding","."]
code: def read(self, count=1024):
      # By default we choose a rather small chunk size, because reading
      # big amounts of input at once, causes the event loop to process
      # all these key bindings also at once without going back to the
      # loop. This will make the application feel unresponsive.
      """
      Read the input and return it as a string.
  
      Return the text. Note that this can return an empty string, even when
      the input stream was not yet closed. This means that something went
      wrong during the decoding.
      """
      if self.closed:
          return b""
  
      # Note: the following works better than wrapping `self.stdin` like
      #       `codecs.getreader('utf-8')(stdin)` and doing `read(1)`.
      #       Somehow that causes some latency when the escape
      #       character is pressed. (Especially on combination with the `select`.)
      try:
          data = os.read(self.stdin_fd, count)
  
          # Nothing more to read, stream is closed.
          if data == b"":
              self.closed = True
              return ""
      except OSError:
          # In case of SIGWINCH
          data = b""
  
      return self._stdin_decoder.decode(data)
  
imports: from __future__ import unicode_literals
  from codecs import getincrementaldecoder
  import os
  import six
label_desc: Use image node_id 2 for calling the PosixStdinReader obj's underlying member method code with example usage: obj.read(count) and returns: self, bytes, str