I habe a widgettext in a notebook as follows:
myinput = widgets.Text(value='', palceholder='introduce your number')
def myinput_handler(sender):
'''
'''
#do something
myinput.on_submit(myinput_handler)
# button
my_btn = widgets.Button(description='LOAD')
def my_btn_handler(change):
if len(myinput.value) == '':
my_input.value = 3333
else:
dossier = myinput.value
##### ---> RUN myinput_handler(sender)
my_btn.on_click(my_btn_handler)
basically What I would like to find is the way to run the same code as if the widget text would be submitted, but clicking a button
any idea there?
Given that observe just passes through the widget when the function is run, couldn't you just run your handler function and pass the widget directly as an argument to replicate submitting?