Show More
@@ -20,6 +20,7 b' except ImportError:' | |||
|
20 | 20 | from IPython.utils.signatures import signature, Parameter |
|
21 | 21 | from inspect import getcallargs |
|
22 | 22 | |
|
23 | from IPython.core.getipython import get_ipython | |
|
23 | 24 | from IPython.html.widgets import (Widget, TextWidget, |
|
24 | 25 | FloatSliderWidget, IntSliderWidget, CheckboxWidget, DropdownWidget, |
|
25 | 26 | ContainerWidget, DOMWidget) |
@@ -205,7 +206,14 b' def interactive(__interact_f, **kwargs):' | |||
|
205 | 206 | container.kwargs[widget.description] = value |
|
206 | 207 | if co: |
|
207 | 208 | clear_output(wait=True) |
|
208 | container.result = f(**container.kwargs) | |
|
209 | try: | |
|
210 | container.result = f(**container.kwargs) | |
|
211 | except Exception as e: | |
|
212 | ip = get_ipython() | |
|
213 | if ip is None: | |
|
214 | container.log.warn("Exception in interact callback: %s", e, exc_info=True) | |
|
215 | else: | |
|
216 | ip.showtraceback() | |
|
209 | 217 | |
|
210 | 218 | # Wire up the widgets |
|
211 | 219 | for widget in kwargs_widgets: |
General Comments 0
You need to be logged in to leave comments.
Login now