summaryrefslogtreecommitdiffstats
path: root/examples/print-text/print-frame.py
blob: fb703c5eec91d22dc589c7575c0df13abb0a4e27 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/env python
"""
Example usage of 'print_container', a tool to print
any layout in a non-interactive way.
"""
from prompt_toolkit.shortcuts import print_container
from prompt_toolkit.widgets import Frame, TextArea

print_container(
    Frame(
        TextArea(text="Hello world!\n"),
        title="Stage: parse",
    )
)