【发布时间】:2019-07-11 18:23:21
【问题描述】:
我有两个可执行文件,例如 A.exe、B.exe。 python子进程是否有可能通过stdin/stdout相互通信这两个可执行文件:
A = Popen("A.exe",...,stdin=B.stdout, stdout=PIPE)
B = Popen("B.exe",...,stdin=A.stdout, stdout=PIPE) ?
(其中 A.exe 包含 print/scanf 对,B.exe 包含 scanf/printfs。)
【问题讨论】:
-
不知道你在问什么,虽然
pexpect并且都运行并做任何你想从一个到另一个的东西?
标签: python redirect stdout stdin