I need the following functionality:
#what do you want to name the processed file?
(widget here)
filename=(widget input string)
I did not find any easy examples in the widget documentation or other searches.
You can either use standard python input()
text = input("Your input: ")
print(text)
or use the ipywidgets module
import ipywidgets as widgets
text = widgets.Text(placeholder='Your input')
display(text)
def print_input(sender):
print(text.value)
text.on_submit(print_input)
also see the docs for the ipywidgets module here.