pycharm 将log输出到txt文件中。

151 阅读1分钟
import sys
f = open('LOG-1.txt', 'a')
sys.stdout = f
sys.stderr = f