Closed masaguaro closed 5 years ago
widgets only show up on the page when they are displayed. If you want to display a widget:
from IPython.display import display
display(widget)
widget_2
is being displayed there because it is the last statement in the cell, which IPython interprets as the 'result' of the cell, so it gets displayed automatically.
@minrk Thank you very much!
I am working on Windows and Jupyter notebook. I was trying to execute a try and except block, in a Jupyter cell, with some widgets.Button within but it does not work. I have simplified the situation in the following code:
After executing the Jupyter cell it will print
" Before widget_1"
and"After widget_1"
, and thenwidget_2
will show up.However,
widget_1
does not show up.Any idea why it does not work as I expected ?