parameters: (*args, **kwargs)
return_statement: return output
docstring: Python 2.6 compatible implementation of subprocess.check_output.
docstring_summary: Python 2.6 compatible implementation of subprocess.check_output.
docstring_tokens: Python 2 . 6 compatible implementation of subprocess . check_output .
function: def _check_output(*args, **kwargs):
          """Python 2.6 compatible implementation of subprocess.check_output."""
          proc = subprocess.Popen(stdout=subprocess.PIPE, *args, **kwargs)
          output, unused_err = proc.communicate()
          retcode = proc.poll()
          if retcode:
              cmd = kwargs.get('args', args[0])
              e = subprocess.CalledProcessError(retcode, cmd)
              e.output = output
              raise e
  
          return output
function_tokens: def _check_output ( * args , * * kwargs ) : proc = subprocess . Popen ( stdout = subprocess . PIPE , * args , * * kwargs ) output , unused_err = proc . communicate ( ) retcode = proc . poll ( ) if retcode : cmd = kwargs . get ( 'args' , args [ 0 ] ) e = subprocess . CalledProcessError ( retcode , cmd ) e . output = output raise e return output