summaryrefslogtreecommitdiffstats
path: root/examples/prompts/confirmation-prompt.py
blob: bd52b9e96a231ee40b380a981139f1cbf2c90d5d (plain)
1
2
3
4
5
6
7
8
9
#!/usr/bin/env python
"""
Example of a confirmation prompt.
"""
from prompt_toolkit.shortcuts import confirm

if __name__ == "__main__":
    answer = confirm("Should we do that?")
    print("You said: %s" % answer)