ansi_escape/readme.md

23 lines
1.0 KiB
Markdown
Raw Normal View History

2021-03-12 21:33:18 +00:00
ansi_escape
===========
A pure python3 library for ansi VT-100 escape codes
---------------------------------------------------
See the doc/ folder and ansi_escape.py for documentation (WIP)
See the examples directory for examples/ You need to copy the ansi_escape.py file to the example/ directory to run the examples.
Since this library wraps around text sent to the terminal it only returns strings that need to be put inside a print() statement, example:
```python
print(ansi_escape.color("fg", "red") + "Hello")
```
On the positive side that means that you easily can send
output to a file using .write() or write it to the terminal using sys.stdout.write().
You are not limited by the limitations of print().
2021-03-09 14:02:21 +00:00
Features:
2021-03-12 21:33:18 +00:00
---------
SGR (Select Graphic Rendition)
SGR foreground and background color support with support for 256 8-bit colors and 24-bit true color
2021-03-09 14:02:21 +00:00
SGR text formating like; underline, overline and bold text
2021-03-12 21:33:18 +00:00
Use the bell character
Free cursor movement
Clear parts of screen or line
Toggle keyboard leds