If I understood correctly, you could do it via js.
See the following code:
from IPython.display import Javascript
Javascript('IPython.notebook.execute_cells_below()')
Fulfills all cells under the active cell, so for you this might be something like:
from IPython.display import Javascript, display
from ipywidgets import widgets
def run_all(ev):
display(Javascript('IPython.notebook.execute_cells_below()'))
button = widgets.Button(description="Create next input")
button.on_click(run_all)
display(button)
Let me know if this is what you need.
source
share