【发布时间】:2020-12-30 04:26:07
【问题描述】:
我知道我可以打电话
jupyter nbconvert --execute --to html notebook.ipynb
从 shell,或从 Python 进行系统调用:
import os
os.system('jupyter nbconvert --execute --to html notebook.ipynb')
但是当 nbconvert 模块在原生 Python 中可用时,必须通过系统调用来执行此操作似乎很奇怪!
我想编写原生 python 来执行 iPython 笔记本并将其转换为 html 文件。 我研究了official documentation 一点,但无法拼凑起来。 我的问题是:
- 有没有在本机 Python 中将笔记本转换为 html 的示例?
- 是否有令人信服的理由不这样做?
【问题讨论】:
标签: jupyter-notebook jupyter nbconvert