qexat / anstrip

anstrip is a minimal library to strip ANSI sequences from strings.

Home Page:https://pypi.org/project/anstrip/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

anstrip

PyPI

anstrip is a minimal library to strip ANSI sequences from strings.

It provides:

  • PATTERN, the regex pattern used by the functions of anstrip
  • strip, a function to remove all the escape sequences from a string
  • auto_strip, a function that is similar to strip, except that it only removes if the output is a TTY
  • print, a function that is similar to the built-in print but with sequence auto-stripping
  • printed_length, a function that returns the length of the string as seen on the screen

About

anstrip is a minimal library to strip ANSI sequences from strings.

https://pypi.org/project/anstrip/

License:MIT License


Languages

Language:Python 100.0%