如何解决jupyter笔记本从bash脚本获取先前的单元格输出,该bash脚本运行使用日志记录的python脚本
我有一个bash脚本,它调用python脚本,该脚本使用日志记录生成输出。 我想用_捕获上一个单元的输出,但是它始终为空
例如:
[cell1]
%%bash --out output
sh ./script1
# calls pyscript.py
# generates hello world through the logging module
# 2020-08-19 07:50:26,481 - INFO - hello world
[cell2]
# none of these work
print(_)
print(output)
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。