def _executeExternalCmdAndReapStdout(args):
 _debugOut(('_executeExternalCmdAndReapStdout: Starting...\n<%s>' % (args,)))
 p = subprocess.Popen(args, env=os.environ, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
 _debugOut(('Process started for <%s>' % (args,)))
 (stdoutData, stderrData) = p.communicate()
 _debugOut((('Process completed for <%s>: exit status=%s, ' + 'stdoutDataType=%s, stdoutData=<%s>, stderrData=<%s>') % (args, p.returncode, type(stdoutData), stdoutData, stderrData)))
 result = dict(exitStatus=p.returncode, stdoutData=stdoutData, stderrData=stderrData)
 _debugOut(('_executeExternalCmdAndReapStdout for <%s>: result=\n%s' % (args, pprint.pformat(result, indent=4))))
 return result

def _executeExternalCmdAndReapStdout ( args ) : _debugOut ( ( '_executeExternalCmdAndReapStdout: Starting...\n<%s>' % ( args , ) ) ) p = subprocess . Popen ( args , env = os . environ , stdout = subprocess . PIPE , stderr = subprocess . PIPE ) _debugOut ( ( 'Process started for <%s>' % ( args , ) ) ) ( stdoutData , stderrData ) = p . communicate ( ) _debugOut ( ( ( 'Process completed for <%s>: exit status=%s, ' + 'stdoutDataType=%s, stdoutData=<%s>, stderrData=<%s>' ) % ( args , p . returncode , type ( stdoutData ) , stdoutData , stderrData ) ) ) result = dict ( exitStatus = p . returncode , stdoutData = stdoutData , stderrData = stderrData ) _debugOut ( ( '_executeExternalCmdAndReapStdout for <%s>: result=\n%s' % ( args , pprint . pformat ( result , indent = 4 ) ) ) ) return result
args: args list as defined for the args parameter in subprocess .