【发布时间】:2021-04-08 12:01:59
【问题描述】:
我正在使用 Prophet(Facebook 的时间序列库),它产生了很多输出。像这样的东西: Prophet output
我已经沉默了一些这样的输出:
@contextmanager
def suppress_stdout():
with open(os.devnull, "w") as devnull:
old_stdout = sys.stdout
sys.stdout = devnull
try:
yield
finally:
sys.stdout = old_stdout
但它不会静默所有类型的输出,我如何静默所有类型?
【问题讨论】:
标签: python output facebook-prophet