summaryrefslogtreecommitdiffstats
path: root/examples/dialogs/input_dialog.py
blob: 057bc37f3779967caf7530c2b3a878c53815236c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/env python
"""
Example of an input box dialog.
"""

from prompt_toolkit.shortcuts import input_dialog


def main():
    result = input_dialog(
        title="Input dialog example", text="Please type your name:"
    ).run()

    print(f"Result = {result}")


if __name__ == "__main__":
    main()