File: print-frame.py

package info (click to toggle)
prompt-toolkit 3.0.51-4
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 6,232 kB
  • sloc: python: 30,894; makefile: 151; sh: 6
file content (15 lines) | stat: -rwxr-xr-x 332 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/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",
    )
)