diff --git a/connpy/core.py b/connpy/core.py index 6c95355..feb2d91 100755 --- a/connpy/core.py +++ b/connpy/core.py @@ -133,7 +133,8 @@ class node: t = open(logfile, "r").read() else: t = logfile - t = t.replace("\n","",1).replace("\a","") + t = t.replace("\n","",1) + t = t.replace("\a","") t = t.replace('\n\n', '\n') t = re.sub(r'.\[K', '', t) while True: @@ -144,6 +145,7 @@ class node: ansi_escape = re.compile(r'\x1B(?:[@-Z\\-_]|\[[0-?]*[ -/ ]*[@-~])') t = ansi_escape.sub('', t) t = t.lstrip(" \n\r") + t = t.replace("\r","") if var == False: d = open(logfile, "w") d.write(t) diff --git a/docs/connpy/index.html b/docs/connpy/index.html index 804bc38..4dba325 100644 --- a/docs/connpy/index.html +++ b/docs/connpy/index.html @@ -1979,7 +1979,8 @@ tasks: t = open(logfile, "r").read() else: t = logfile - t = t.replace("\n","",1).replace("\a","") + t = t.replace("\n","",1) + t = t.replace("\a","") t = t.replace('\n\n', '\n') t = re.sub(r'.\[K', '', t) while True: @@ -1990,6 +1991,7 @@ tasks: ansi_escape = re.compile(r'\x1B(?:[@-Z\\-_]|\[[0-?]*[ -/ ]*[@-~])') t = ansi_escape.sub('', t) t = t.lstrip(" \n\r") + t = t.replace("\r","") if var == False: d = open(logfile, "w") d.write(t)