Skip to content

Note

Click here to download the full example code

Input values dialog#

A basic example of a user input dialog.

This will pause code execution until the user responds.

Values input dialog#

1
2
3
4
5
6
7
8
from magicgui.widgets import request_values

vals = request_values(
    age=int,
    name={"annotation": str, "label": "Enter your name:"},
    title="Hi, who are you?",
)
print(repr(vals))

Total running time of the script: ( 0 minutes 0.000 seconds)

Download Python source code: values_dialog.py

Download Jupyter notebook: values_dialog.ipynb

Gallery generated by mkdocs-gallery