利用os.system 截取终端日志输出 存为txt

# -*- coding: utf-8 -*-
import os
os.system(r"python %s/add_test.py > terminal_record.txt" %os.getcwd())

猜你喜欢

转载自www.cnblogs.com/clemente/p/10413211.html