summaryrefslogtreecommitdiffstats
path: root/examples/dialogs/input_dialog.py
blob: 62352658175ab510c9958a6d037c27bfd5bd3b47 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/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()