.
This commit is contained in:
parent
5224137713
commit
cb29928ba0
1 changed files with 4 additions and 0 deletions
|
|
@ -90,6 +90,10 @@ ANSI_ESCAPE_RE = re.compile(
|
|||
|
||||
# ===================== UTILITY FUNCTIONS =================
|
||||
def apply_backspaces(s):
|
||||
# Ensure we are working with str
|
||||
if isinstance(s, bytes):
|
||||
s = s.decode(errors="ignore")
|
||||
|
||||
buf = []
|
||||
for c in s:
|
||||
if c == "\x08":
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue