parameters: (self, size=1, timeout=None)
return_statement: return s
docstring: This reads data from the file descriptor.
  
          This is a simple implementation suitable for a regular file. Subclasses using ptys or pipes should override it.
  
          The timeout parameter is ignored.
docstring_summary: This reads data from the file descriptor.
docstring_tokens: This reads data from the file descriptor .
function: def read_nonblocking(self, size=1, timeout=None):
          """This reads data from the file descriptor.
  
          This is a simple implementation suitable for a regular file. Subclasses using ptys or pipes should override it.
  
          The timeout parameter is ignored.
          """
  
          try:
              s = os.read(self.child_fd, size)
          except OSError as err:
              if err.args[0] == errno.EIO:
                  # Linux-style EOF
                  self.flag_eof = True
                  raise EOF('End Of File (EOF). Exception style platform.')
              raise
          if s == b'':
              # BSD-style EOF
              self.flag_eof = True
              raise EOF('End Of File (EOF). Empty string style platform.')
  
          s = self._decoder.decode(s, final=False)
          self._log(s, 'read')
          return s
function_tokens: def read_nonblocking ( self , size = 1 , timeout = None ) : try : s = os . read ( self . child_fd , size ) except OSError as err : if err . args [ 0 ] == errno . EIO : # Linux-style EOF self . flag_eof = True raise EOF ( 'End Of File (EOF). Exception style platform.' ) raise if s == b'' : # BSD-style EOF self . flag_eof = True raise EOF ( 'End Of File (EOF). Empty string style platform.' ) s = self . _decoder . decode ( s , final = False ) self . _log ( s , 'read' ) return s