Executes the given command and send the output to the console

    :param str|list command:

    :kwargs:
        * `shell`  (``bool`` = False) --
        * `stdin`  (``*`` = None)     --
        * `stdout` (``*`` = None)     --
        * `stderr` (``*`` = None)     --

    :return: CommandReturnValue

def exec_command(command, **kwargs):
    """
    Executes the given command and send the output to the console

    :param str|list command:

    :kwargs:
        * `shell`  (``bool`` = False) --
        * `stdin`  (``*`` = None)     --
        * `stdout` (``*`` = None)     --
        * `stderr` (``*`` = None)     --

    :return: CommandReturnValue
    """

    shell = kwargs.get('shell', False)
    stdin = kwargs.get('stdin', None)
    stdout = kwargs.get('stdout', None)
    stderr = kwargs.get('stderr', None)

    kwargs.update(shell=shell)
    kwargs.update(stdin=stdin)
    kwargs.update(stdout=stdout)
    kwargs.update(stderr=stderr)

    if not isinstance(command, list):
        command = shlex.split(command)

    return_value = subprocess.call(command, **kwargs)

    return CommandReturnValue(return_value=return_value,
                              stdin=stdin,
                              stdout=stdout,
                              stderr=stderr)