流输出被截断为最后5000行。(google collab)

问题描述 投票:1回答:1

标题表明google collab输出被截断了。我浏览了设置,但没有看到任何限制。解决问题的最佳选择是什么?

google-colaboratory
1个回答
0
投票

我遇到了同样的问题,并通过将输出写入驱动器上的文件来管理它:

from google.colab import drive
drive.mount('/content/drive')
import os
os.chdir("/content/drive/")
with open('/content/drive/output.txt','w') as out:
   out.write(' abcd \n')
© www.soinside.com 2019 - 2024. All rights reserved.