A terminal emulator widget for Textual.
Project description
Textual: Terminal
A terminal widget for Textual using Pyte as a linux terminal emulator.
Textual application example with two terminal widgets:
Usage
from textual_terminal import Terminal
class TerminalApp(App):
def compose(self) -> ComposeResult:
yield Terminal(command="htop", id="terminal_htop")
yield Terminal(command="bash", id="terminal_bash")
def on_ready(self) -> None:
terminal_htop: Terminal = self.query_one("#terminal_htop")
terminal_htop.start()
terminal_bash: Terminal = self.query_one("#terminal_bash")
terminal_bash.start()
Installation
pip install textual-terminal
Features
- Colored output
- Automatic resize to widget dimensions
- Simple key handling (navigation, function keys)
- Simple mouse tracking (click, scroll)
References
This library is based on the Textual pyte example by David Brochart.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
textual_terminal-0.2.2.tar.gz
(8.6 kB
view hashes)
Built Distribution
Close
Hashes for textual_terminal-0.2.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a540592cdf638045cce3333eb5970aafe5e3d6835c3938733fd9e4e91b4e7ec8 |
|
MD5 | 65c250a68f563471d7a5ce66991be93f |
|
BLAKE2b-256 | bdf2d172c96603c772b2a505155e046bbcabfba365c7f0024e5d611094452b66 |