parameters: (self)
return_statement: return True
docstring: Capture stdout, stderr and sideband. Forward them as stream messages.
docstring_summary: Capture stdout, stderr and sideband. Forward them as stream messages.
docstring_tokens: Capture stdout stderr and sideband . Forward them as stream messages .
function: def handle_input(self):
          """Capture stdout, stderr and sideband. Forward them as stream messages."""
          # create pipe for stdout, stderr
          select_on = [self.sideband_pipe]
          for rs in self.replaced_streams:
              if rs:
                  select_on.append(rs.pipe_out)
  
          r, w, x = select.select(select_on, [], [], self.flush_interval)
          if not r:
              # nothing to read, flush libc's stdout and check again
              libc.fflush(c_stdout_p)
              libc.fflush(c_stderr_p)
              return False
  
          for fd in r:
              if fd == self.sideband_pipe:
                  self._process_sideband_data()
              else:
                  if fd == self.replaced_streams[0].pipe_out:
                      rs = 0
                  else:
                      rs = 1
                  self._process_stdio_data(fd, self.replaced_streams[rs].name)
          return True
function_tokens: def handle_input ( self ) : # create pipe for stdout, stderr select_on = [ self . sideband_pipe ] for rs in self . replaced_streams : if rs : select_on . append ( rs . pipe_out ) r , w , x = select . select ( select_on , [ ] , [ ] , self . flush_interval ) if not r : # nothing to read, flush libc's stdout and check again libc . fflush ( c_stdout_p ) libc . fflush ( c_stderr_p ) return False for fd in r : if fd == self . sideband_pipe : self . _process_sideband_data ( ) else : if fd == self . replaced_streams [ 0 ] . pipe_out : rs = 0 else : rs = 1 self . _process_stdio_data ( fd , self . replaced_streams [ rs ] . name ) return True