I'd like - if possible - to use ipywidgets to make a sort of 'image gallery viewer' within an off-line (e.g. viewed via nbviewer) ipython/jupyer notebook.
The images I have in mind would be in dropbox, and would be rendered using iframes. So, for demo purposes, I'm just using wikipedia webpages here.
What I have in mind would something like this:
from ipywidgets import DropDownWidget, StaticInteract
from IPython.display import IFrame, display, clear_output
import sys
links = {'l1': 'http://en.m.wikipedia.org/wiki/Path_integral_formulation',
'l2': 'http://en.m.wikipedia.org/wiki/Spherical_harmonic'}
def show_iframe(link):
clear_output(wait=True)
sys.stdout.flush()
i = IFrame(link,width=800,height=300)
display(i)
StaticInteract(show_iframe,link = DropDownWidget(links.values(), labels=links.keys()))
None
...but this isn't working as hoped.
*Can this be done?*
#!jist -p iframes_with_ipywidgets.ipynb
https://gist.github.com/7b70e3de7dbedc0dd00c