I'm trying to create a Popup widget in Jupyter as described in this vid:
from IPython.html import widgets
which gives the following warning:
ShimWarning: The
IPython.html
package has been deprecated. You should import fromnotebook
instead.IPython.html.widgets
has moved toipywidgets
. "IPython.html.widgets
has moved toipywidgets
."
However, ipywidgets
doesn't have a popup widget and there is nothing in its docs. (By the way, IPython.html.widgets
doesn't have a popup widget either)
How can I create a popup widget in jupyter?
Versions:
Jupyter 1.0.0
IPython 5.1.0
Communication. ipywidgets, also known as jupyter-widgets or simply widgets, are interactive HTML widgets for Jupyter notebooks and the IPython kernel. Notebooks come alive when interactive widgets are used. Users gain control of their data and can visualize changes in the data.
bqplot allows anyone to build fully interactive web applications in Python, using surprisingly few lines of code.
Searching in IPython's repository I found that.. :
PopupWidget was removed from IPython. If you use the PopupWidget, try using a Box widget instead. If your notebook can't live without the popup functionality, subclass the Box widget (both in Python and JS) and use JQuery UI's draggable() and resizable() methods to mimic the behavior.
(emphasis mine)
@jdfreder's comment in related discussion:
The popup widget is an oddball in the built-in widget collection. After talking to the others during the last dev meeting (or meeting before last, I forget which), we came to the conclusion that it is best to remove the popup widget altogether. However, the underlying API that allows one to implement the popup widget will not be removed, see PR #7341 . If we do include something like the popup widget again, it will be implemented from scratch, probably as a phosphor component (or something similar).
@Sylvain Corlay in github chat:
We are moving away from bootstrapjs widgets. For the good cause bootstrap is a bad citizen of the browser. creates global variable etc.. With jupyterlab richer layouts should be enabled.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With