blessed

Python library for creating elegant terminal UIs with colors and input

pipmacoslinuxwindows
Try with needOr install directly
Source

About

Easy, practical library for making terminal apps, by providing an elegant, well-documented interface to Colors, Keyboard input, and screen Positioning capabilities.

Commands

blessed

Examples

Create a simple colored text output in terminal$ python3 -c "from blessed import Terminal; t = Terminal(); print(t.bold_red('Hello World'))"
Display text at specific screen position with colors$ python3 -c "from blessed import Terminal; t = Terminal(); print(t.move(5, 10) + t.green('Positioned text'))"
Capture keyboard input with terminal control$ python3 -c "from blessed import Terminal; t = Terminal(); print('Press any key:'); print(repr(t.inkey()))"