Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions rich/tui/examples/simple.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
from rich.console import Console
from rich.layout import Layout
from rich.table import Table
from rich.tui.app import App
from rich.tui.view import View

from rich.widgets.color_changer import ColorChanger


class SimpleApp(App):
table: Table

def __init__(self):
super().__init__()
def __init__(
self,
console: Console = None,
view: View = None,
screen: bool = True,
):
super().__init__(console, view, screen, title='Simple App')

self.table = table = Table("foo", "bar", "baz")
table.add_row("1", "2", "3")
Expand All @@ -25,4 +32,4 @@ def visualize(self):

if __name__ == "__main__":
app = SimpleApp()
app.run_message_loop()
app.run()