parameters: (self, *popenargs, **kwargs)
return_statement: return output
docstring: Implements the functionality of subprocess.check_output, but also
      prints out the command-line and the command output.
  
      Do not set stdout to anything because this function will redirect it
      using a pipe.
  
      Arguments:
        See subprocess.Popen
  
      returns:
        a string containing the command output
docstring_summary: Implements the functionality of subprocess.check_output, but also
      prints out the command-line and the command output.
docstring_tokens: Implements the functionality of subprocess . check_output but also prints out the command - line and the command output .
function: def Run(self, *popenargs, **kwargs):
      '''Implements the functionality of subprocess.check_output, but also
      prints out the command-line and the command output.
  
      Do not set stdout to anything because this function will redirect it
      using a pipe.
  
      Arguments:
        See subprocess.Popen
  
      returns:
        a string containing the command output
      '''
      if 'stdout' in kwargs or 'stderr' in kwargs:
        raise ValueError('stdout or stderr argument not allowed.')
      command = kwargs.get("args")
      if command is None:
        command = popenargs[0]
      self.Print('Running %s' % command)
      process = subprocess.Popen(stdout=subprocess.PIPE,
                                 stderr=subprocess.PIPE,
                                 *popenargs,
                                 **kwargs)
      output, error_output = process.communicate()
      if error_output:
        self.Print("%s\nStdErr for %s:\n%s" % (output, command, error_output))
      else:
        self.Print(output)
  
      retcode = process.poll() # Note - calling wait() can cause a deadlock
      if retcode != 0:
        raise subprocess.CalledProcessError(retcode, command)
      return output
function_tokens: def Run ( self , * popenargs , * * kwargs ) : if 'stdout' in kwargs or 'stderr' in kwargs : raise ValueError ( 'stdout or stderr argument not allowed.' ) command = kwargs . get ( "args" ) if command is None : command = popenargs [ 0 ] self . Print ( 'Running %s' % command ) process = subprocess . Popen ( stdout = subprocess . PIPE , stderr = subprocess . PIPE , * popenargs , * * kwargs ) output , error_output = process . communicate ( ) if error_output : self . Print ( "%s\nStdErr for %s:\n%s" % ( output , command , error_output ) ) else : self . Print ( output ) retcode = process . poll ( ) # Note - calling wait() can cause a deadlock if retcode != 0 : raise subprocess . CalledProcessError ( retcode , command ) return output