[IPython-dev] Nested and blocking calls of Interact or Interactive

Thomas Kluyver takowl at gmail.com
Fri Jun 19 17:18:27 EDT 2015


On 19 June 2015 at 14:00, Brian E Chapman <Brian.Chapman at utah.edu> wrote:

> Here in a nutshell is what I’m trying to do.
>
>  Iterate over (or select from a dropdown widget) a list of directories
> corresponding to medical imaging exams
> For the selected directory (exam) select a subdirectory (image series)
> For the selected series
> Read in the image
> interactively define a bounding box in the image using IntRangeSlider
>

I think you can do this by dropping down a level from @interactive and
using the widget objects directly. Create the set of widgets you need, and
when the first one is changed, have it update the available options for the
second one. Have a look at these example notebooks:

https://github.com/ipython/ipython/blob/3.x/examples/Interactive%20Widgets/Export%20As%20%28nbconvert%29.ipynb
https://github.com/ipython/ipython/blob/3.x/examples/Interactive%20Widgets/Widget%20Events.ipynb

The widgets don't show up on Github, but if you download them and run them
locally, you'll see them.

Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20150619/6f07be8b/attachment.html>


More information about the IPython-dev mailing list