admin管理员组

文章数量:1290966

I have a Python program in Jupyter Notebook that uses interact from the module ipywidgets.

interact(my_func, filter_by=filter_by_list, format_type=format_dict.keys())

I want someone to be able to open the notebook on a website somewhere and use the interactive widget without requiring Python or anything else, just like here.

I have a Python program in Jupyter Notebook that uses interact from the module ipywidgets.

interact(my_func, filter_by=filter_by_list, format_type=format_dict.keys())

I want someone to be able to open the notebook on a website somewhere and use the interactive widget without requiring Python or anything else, just like here.

Share Improve this question edited Apr 7, 2017 at 23:16 Imran asked Apr 6, 2017 at 12:10 ImranImran 6561 gold badge11 silver badges20 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 7

You can check out this website: http://ipywidgets.readthedocs.io/en/latest/embedding.html#python-interface

from ipywidgets import IntSlider
from ipywidgets.embed import embed_minimal_html

slider = IntSlider(value=40)
embed_minimal_html('export.html', views=[slider], title='Widgets export')

According to the docs it produces an export.html file.

本文标签: javascriptExporting ipywidgets to a websiteStack Overflow