Result from interactive show as value some jupyter widget

22 views
Skip to first unread message

Jan Komiš

unread,
Jan 29, 2018, 11:40:26 AM1/29/18
to Project Jupyter
Good day

I don´t know How I can show result from interactive method as value some jupyter widget (etc IntText). For example how I can show result from c_interaction as value c_value? Thank you for every answer.

from IPython.display import display import ipywidgets as widgets from ipywidgets import interactive

a_value
= widgets.IntText(description='a value:') b_value = widgets.IntSlider(description='b value:')

def f(a, b):
    c
= a+b
   
return c

c_interaction
= interactive(f, a=a_value, b=b_value)

c_value
= widgets.IntText(description='c value:',value = c_interaction.result)


display
(a_value,b_value,c_value)


Reply all
Reply to author
Forward
0 new messages