Will return the text output of running the given executable with the given arguments.
This is just a convenience wrapper for subprocess.Popen, so the exeAndArgs argment should have the same format as the first argument to Popen: ie, either a single string giving the executable, or a list where the first element is the executable and the rest are arguments.
kwargs are passed onto subprocess.Popen
Note that if the keyword arg ‘stdout’ is supplied (and is something other than subprocess.PIPE), then the return will be empty - you must check the file object supplied as the stdout yourself.
Also, ‘stderr’ is given the default value of subprocess.STDOUT, so that the return will be the combined output of stdout and stderr.
Finally, since maya’s python build doesn’t support universal_newlines, this is always set to False - however, set convertNewlines to True for an equivalent result.