(command, stdin=None, *args, **kwargs)
return output, error, returncode
Run the command described by command, then interact with process.

    :param stdin: the data you want to send to stdin.
    :return: a tuple of stdout, stderr and returncode
Run the command described by command, then interact with process.
Run the command described by command then interact with process .
def communicate_process(command, stdin=None, *args, **kwargs):
    """Run the command described by command, then interact with process.

    :param stdin: the data you want to send to stdin.
    :return: a tuple of stdout, stderr and returncode
    """
    p = Popen(command, stdin=PIPE, stdout=PIPE, stderr=PIPE, *args, **kwargs)
    output, error = p.communicate(stdin)
    returncode = p.returncode
    return output, error, returncode
def communicate_process ( command , stdin = None , * args , * * kwargs ) : p = Popen ( command , stdin = PIPE , stdout = PIPE , stderr = PIPE , * args , * * kwargs ) output , error = p . communicate ( stdin ) returncode = p . returncode return output , error , returncode