summaryrefslogtreecommitdiffstats
path: root/examples/prompts/multiline-prompt.py
blob: d6a7698cbc8bf17c78e5b942f55f7c8b283c054b (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/usr/bin/env python
"""
Demonstration of how the input can be indented.
"""
from prompt_toolkit import prompt

if __name__ == "__main__":
    answer = prompt(
        "Give me some input: (ESCAPE followed by ENTER to accept)\n > ", multiline=True
    )
    print("You said: %s" % answer)