hbutils.encoding.ansi

Overview:

Functions for ansi escaping and unescapes. See ANSI escape code - Wikipedia.

ansi_unescape

hbutils.encoding.ansi.ansi_unescape(string: str) → str[source]
Overview:

Unescape ansi string. See ANSI escape code - Wikipedia.

Parameters:

string – Original output string.

Return unescaped:

Unescaped ansi string.

Examples::
>>> from hbutils.encoding import ansi_unescape
>>> ansi_unescape("Hello")
'Hello'
>>> ansi_unescape("World")
'World'