tessl install tessl/pypi-textual@6.1.0Modern Text User Interface framework for building cross-platform terminal and web applications with Python
Agent Success
Agent success rate when using this tile
93%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.18x
Baseline
Agent success rate without this tile
79%
Build a terminal application that processes a list of items in the background while displaying real-time progress and allowing user interaction.
Create a Textual application with the following functionality:
The application should display:
When the "Start" button is pressed:
When the "Cancel" button is pressed:
@generates
from textual.app import App, ComposeResult
from textual.widgets import Button, Label, Static
from textual.containers import Container
class ProcessorApp(App):
"""Application that processes items in the background with progress tracking."""
def compose(self) -> ComposeResult:
"""Create the application layout."""
pass
def on_button_pressed(self, event: Button.Pressed) -> None:
"""Handle button press events."""
pass
def process_items(self) -> None:
"""Background method that processes items with progress tracking."""
passProvides the TUI framework for building terminal applications with background task support.