summaryrefslogtreecommitdiffstats
path: root/examples/dialogs/yes_no_dialog.py
blob: 4b08dd6756eb91b51e3b1849b15fc7488f33d79c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/env python
"""
Example of confirmation (yes/no) dialog window.
"""
from prompt_toolkit.shortcuts import yes_no_dialog


def main():
    result = yes_no_dialog(
        title="Yes/No dialog example", text="Do you want to confirm?"
    ).run()

    print(f"Result = {result}")


if __name__ == "__main__":
    main()