[IPython-dev] (no subject)

col colyork at gmail.com
Thu Sep 24 21:24:43 EDT 2015


I'm trying use a multi select widget to enable users to select from a list
of countries, and then have a widget button which, when clicked, runs all
the cells below.

This displays the list.

from IPython.display import display
w = widgets.SelectMultiple(

    description="Select up to five countries",
    options=dfCountries['name'].tolist()
)
display(w)

And I want something like this to run all cells below:

def run_all(button):
    get_ipython().run_cell()

button = widgets.Button(description="Create next input")
button.on_click(run_all)
display(button)

But I can't find the hook to 'run all cells below

Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20150925/0cfaa8ef/attachment.html>


More information about the IPython-dev mailing list