我想将python脚本的子进程'stdout和stdin指向同一个文件.我不知道的是如何使两个来源的线条区分开来?(例如,带有感叹号的stderr行前缀.)
在我的特定情况下,不需要对子进程进行实时监视,执行的Python脚本可以等待其执行结束.
python subprocess stdout stderr
python ×1
stderr ×1
stdout ×1
subprocess ×1