ansi-escapes-python
ANSI escape codes for manipulating the terminal (by shawwn)
mb-util
OS- and data-manipulation utility functions not otherwise categorizable (by mike-bourgeous)
ansi-escapes-python | mb-util | |
---|---|---|
1 | 1 | |
4 | 0 | |
- | - | |
0.0 | 3.0 | |
almost 3 years ago | 11 months ago | |
Python | Ruby | |
- | BSD 2-clause "Simplified" License |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
ansi-escapes-python
Posts with mentions or reviews of ansi-escapes-python.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2021-08-11.
-
ANSI Escape Codes
If someone wants to do this in Python, I made a lib for it: pip3 install ansi-escapes
It’s a port of sindresorhus’s ansi-escapes library. I find it way more convenient than looking up codes.
https://github.com/shawwn/ansi-escapes-python
See also ansi-styles, the lib that Chalk is based on. (Colors! You like colors? Are you a curmudgeony salt that refuses to use Rich for some reason? Use that.)
As with ansi-escapes, you can just pip install ansi-styles.
https://github.com/shawwn/ansi-styles-python
mb-util
Posts with mentions or reviews of mb-util.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2021-08-11.
-
ANSI Escape Codes
It's also fairly straightforward to strip escape codes if you need to using sed or similar[0], and there probably already exists a tool that will do just that specifically and more robustly than my example.
[0] Here's a basic example I wrote in Ruby: https://github.com/mike-bourgeous/mb-util/blob/5616cc4ce6218...
str.gsub(/\e\[[^A-Za-z~]*[A-Za-z~]/, '')
What are some alternatives?
When comparing ansi-escapes-python and mb-util you can also consider the following projects:
notcurses - blingful character graphics/TUI library. definitely not curses.