Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ewen-lbh/python-strip-ansi

Strip ANSI escape sequences from a string
https://github.com/ewen-lbh/python-strip-ansi

Last synced: 12 days ago
JSON representation

Strip ANSI escape sequences from a string

Awesome Lists containing this project

README

        

strip-ansi
----------

Strip ANSI escape sequences from a string

Installation
============

`strip-ansi` is available on `on PyPI `_:

.. code:: shell

pip install strip_ansi

Usage
=====

.. WARNING::
This package only supports python 3.6 and up. It may work on older versions (maybe even python 2)
but I'm not sure.

.. code:: python

>>> from strip_ansi import strip_ansi
>>> strip_ansi("\033[38mLorem ipsum\033[0m")
"Lorem ipsum"