Jupyter笔记本包装器,用于在笔记本外提供输出单元格
jupyter-singleton的Python项目详细描述
Jupyter单曲
简介
jupyter singleton是jupyter笔记本的包装器,它允许使用来自jupyter notebook
环境外部的输出单元格。因此,它使您能够在您喜爱的ide中编程时使用ipywidgets
和grammar of graphics包。
用法
例1
您可以使用jupyter singletondisplay
函数,类似于ipythondisplay
函数。但是,这里的结果将显示在一个新的浏览器窗口中。
from ipywidgets import Label
from jupyter_singleton.direct import display
display(Label('I will be displayed in a browser window'))
display(Label('I will be displayed in another browser window'))
例2
您还可以使用jupyter singletonopen_singleton
函数在新的浏览器窗口中激活jupyter输出单元。也可以使用传统的ipythondisplay
函数来显示小部件以及ipywidgetsinteract
函数。
from IPython.display import display
from ipywidgets import interact, Label
from jupyter_singleton.direct import open_singleton
def f(x):
return x
open_singleton()
interact(f, x=10)
display(Label('I will be displayed in the same browser window as the interact-slider'))
依赖关系
ipykernel
(版本>;=5.1.1)IPython
(版本>;=7.5.0)jinja2
(版本>;=2.10.1)jupyter_client
(版本>;=5.2.4)jupyter_nbextensions_configurator
(版本>;=0.4.1)notebook
(版本>;=5.7.8)tornado
(版本>;=6.0.2)
安装
$ pip install jupyter-singleton
许可证
这个软件是根据麻省理工学院的许可证授权的。查看LICENSE文件 详细情况。