Mimic the IPython notebook cell execution

Yesterday, I was visiting the Jake VanderPlas
‘s Scientific Python Course site
because of some issues raised at the ipython-dev mailing list (and obviously, because Jake usually do amazing things).

To build his site, Jake wrote an Hyde
plugin to render ipynb
files to static html files using the IPython.convert
platform. You can see an example of the final rendered document here
.

When I saw the final document, I wondered if we could have hidden output cells which automatically get visible after a click over the input cell… and then, I made some experiments using the power of the IPython.nbconvert
library ;-)

NOTE: From here, to see the output of each cell, please click on the input area and surprise yourself!

First, we needed to rewrite some things at the Jinja
template level:

稿源:Damian's blog (源链) | 关于 | 阅读提示

本站遵循[CC BY-NC-SA 4.0]。如您有版权、意见投诉等问题,请通过eMail联系我们处理。
酷辣虫 » 手机数码 » Mimic the IPython notebook cell execution

喜欢 (0)or分享给?

专业 x 专注 x 聚合 x 分享 CC BY-NC-SA 4.0

使用声明 | 英豪名录
切换注册

登录

忘记密码 ?

您也可以使用第三方帐号快捷登录

Q Q 登 录
微 博 登 录
切换登录

注册