File: profile_startup.py

package info (click to toggle)
textual-textarea 0.17.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 720 kB
  • sloc: python: 3,195; makefile: 25
file content (24 lines) | stat: -rw-r--r-- 532 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
from textual.app import App, ComposeResult

from textual_textarea import TextEditor


class TextApp(App, inherit_bindings=False):
    def compose(self) -> ComposeResult:
        self.ta = TextEditor(
            text="class TextApp(App):",
            language="python",
            theme="monokai",
            use_system_clipboard=True,
            id="ta",
        )
        yield self.ta

    def on_mount(self) -> None:
        self.ta.focus()
        self.exit()


if __name__ == "__main__":
    app = TextApp()
    app.run()