Windows将stdout和stderr重定向到一个文件

我试图将python脚本的输出重定向到一个文件。 我跑了:

C:>python c:python_script.py > a.txt 2>&1

在这里找到,但输出只在进程完成或被杀死后才写入。 当输出写入stdout&stderr时,是否有办法将重定向写入文件?

链接地址: http://www.djcxy.com/p/92309.html

上一篇: Windows redirect stdout and stderr to a file

下一篇: Why simple redirection does not work in Windows cmd?