0

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.

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.