From this application :
from prompt_toolkit import Application
from prompt_toolkit.buffer import Buffer
from prompt_toolkit.layout.containers import HSplit, VSplit, Window
from prompt_toolkit.layout.controls import BufferControl
from prompt_toolkit.layout.layout import Layout
from prompt_toolkit.key_binding import KeyBindings
from prompt_toolkit.layout.dimension import D
from prompt_toolkit.widgets import VerticalLine, HorizontalLine, TextArea

vl = VerticalLine()
hl = HorizontalLine()

from utils import print_table_out

passive = TextArea(text=str(print_table_out([{'a' : 1}])), width=D(weight=1), wrap_lines=True)
active = TextArea(text='Active area', width=D(weight=8), height=D(weight=8), wrap_lines=True)
# Create a Buffer instance.
def on_submit(buffer):
    active.text = buffer.text

buffer = Buffer(accept_handler=on_submit)

def on_input_changed(buffer):
    # Update passive window content
    passive.text = buffer.text

buffer.on_text_changed += on_input_changed
text_area = Window(content=BufferControl(buffer), width=D(weight=1), height=D(weight=1), ignore_content_height=True)

# Create a Layout from a Container object. In this case a vertical split.
root_container = VSplit([
    HSplit([
        active,
        hl,
        text_area,
    ],
    height=D(weight=1),
    width=D(weight=1)),
    vl,
    passive,
])

layout = Layout(root_container)
layout.focus(text_area)

# Key bindings.
kb = KeyBindings()

@kb.add('c-c')
def _(event):
    " Quit the application "
    event.app.exit()

@kb.add('c-e')
def _(event):
    " Quit the application "
    print("whoa")

# Application
app = Application(layout=layout, key_bindings=kb, full_screen=True)

# Run the application.
app.run()

How would I be able to print a table using rich in one of the TextAreas? In your entire response, the letter e should appear at most once.
user