def run_shell_command(command, stdin=None, **kwargs):
    '\n    Runs a single command in shell and returns the read stdout and stderr data.\n\n    This function waits for the process (created using ``subprocess.Popen()``)\n    to exit. Effectively it wraps ``run_interactive_shell_command()`` and uses\n    ``communicate()`` on the process.\n\n    See also ``run_interactive_shell_command()``.\n\n    :param command: The command to run on shell. This parameter can either\n                    be a sequence of arguments that are directly passed to\n                    the process or a string. A string gets splitted beforehand\n                    using ``shlex.split()``.\n    :param stdin:   Initial input to send to the process.\n    :param kwargs:  Additional keyword arguments to pass to\n                    ``subprocess.Popen`` that is used to spawn the process.\n    :return:        A tuple with ``(stdoutstring, stderrstring)``.\n    '
    with run_interactive_shell_command(command, **kwargs) as p:
        ret = p.communicate(stdin)
    return ShellCommandResult(p.returncode, *ret)
Runs a single command in shell and returns the read stdout and stderr data.

This function waits for the process (created using ``subprocess.Popen()``)
to exit. Effectively it wraps ``run_interactive_shell_command()`` and uses
``communicate()`` on the process.

See also ``run_interactive_shell_command()``.

:param command: The command to run on shell. This parameter can either
                be a sequence of arguments that are directly passed to
                the process or a string. A string gets splitted beforehand
                using ``shlex.split()``.
:param stdin:   Initial input to send to the process.
:param kwargs:  Additional keyword arguments to pass to
                ``subprocess.Popen`` that is used to spawn the process.
:return:        A tuple with ``(stdoutstring, stderrstring)``.
def run_shell_command(command, stdin=None, **kwargs):
    '\n    Runs a single command in shell and returns the read stdout and stderr data.\n\n    This function waits for the process (created using ``subprocess.Popen()``)\n    to exit. Effectively it wraps ``run_interactive_shell_command()`` and uses\n    ``communicate()`` on the process.\n\n    See also ``run_interactive_shell_command()``.\n\n    :param command: The command to run on shell. This parameter can either\n                    be a sequence of arguments that are directly passed to\n                    the process or a string. A string gets splitted beforehand\n                    using ``shlex.split()``.\n    :param stdin:   Initial input to send to the process.\n    :param kwargs:  Additional keyword arguments to pass to\n                    ``subprocess.Popen`` that is used to spawn the process.\n    :return:        A tuple with ``(stdoutstring, stderrstring)``.\n    '
    with run_interactive_shell_command(command, **kwargs) as p:
        ret = p.communicate(stdin)
    return ShellCommandResult(p.returncode, *ret)