def _run_program(name, *args, **kwargs):
    """Runs program name with the arguments of *args

    :param shell: if true, runs the command in the shell
    :type shell: bool

    :param return_object: if true, returns a CommandOutput object
    :type return_object: bool

    :param ro: same as return_object
    :type ro: bool

    :param no_return: doesn't return results, allowing for non-blocking calls
    :type no_return: bool

    :param nr: same as no_return
    :type nr: bool

    :param input: specifies a string to send to the process
    :type input: str

    :returns: if return_object the output as a CommandOutput object, if no_return nothing, else the stdout of the program
    :rtype: CommandOutput or str or None
    """
    shell = kwargs.get("shell", False)

    return_object = kwargs.get("ro", False)
    return_object = kwargs.get("return_object", return_object)

    no_return = kwargs.get("nr", False)
    no_return = kwargs.get("no_return", no_return)

    inp = kwargs.get("input", None)

    args = [name] + list(args)
    p = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=shell)

    if not no_return:
        if inp:
            stdout, stderr = tuple(x.decode(sys.getdefaultencoding()).strip() for x in p.communicate(inp))
        else:
            stdout, stderr = tuple(x.decode(sys.getdefaultencoding()).strip() for x in p.communicate())


        if return_object:
            return CommandOutput(stdout, stderr, p.returncode)
        else:
            return stdout