##// END OF EJS Templates
Disable run button until the function finishes
Gordon Ball -
Show More
@@ -210,6 +210,8 b' def interactive(__interact_f, **kwargs):'
210 container.kwargs[widget.description] = value
210 container.kwargs[widget.description] = value
211 if co:
211 if co:
212 clear_output(wait=True)
212 clear_output(wait=True)
213 if on_demand:
214 on_demand_button.disabled = True
213 try:
215 try:
214 container.result = f(**container.kwargs)
216 container.result = f(**container.kwargs)
215 except Exception as e:
217 except Exception as e:
@@ -218,6 +220,9 b' def interactive(__interact_f, **kwargs):'
218 container.log.warn("Exception in interact callback: %s", e, exc_info=True)
220 container.log.warn("Exception in interact callback: %s", e, exc_info=True)
219 else:
221 else:
220 ip.showtraceback()
222 ip.showtraceback()
223 finally:
224 if on_demand:
225 on_demand_button.disabled = False
221
226
222 # Wire up the widgets
227 # Wire up the widgets
223 # If we are doing on demand running, the callback is only triggered by the button
228 # If we are doing on demand running, the callback is only triggered by the button
General Comments 0
You need to be logged in to leave comments. Login now