From 738e324f56a84944ab265cfda3d51866e34c9474 Mon Sep 17 00:00:00 2001 From: CorpNewt <12772521+corpnewt@users.noreply.github.com> Date: Sun, 14 Jul 2024 14:38:14 -0500 Subject: [PATCH] Fix issues with python 2 --- Scripts/utils.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Scripts/utils.py b/Scripts/utils.py index e01bf1c..8bd8230 100755 --- a/Scripts/utils.py +++ b/Scripts/utils.py @@ -222,9 +222,10 @@ class Utils: # Header drawing method def head(self, text = None, width = 55): if not self.interactive: - print(text, file=sys.stderr) + sys.stderr.write(str(text)+"\n") + sys.stderr.flush() return - if text == None: + if text is None: text = self.name self.cls() print(" {}".format("#"*width)) @@ -245,7 +246,8 @@ class Utils: if self.interactive: print(text) else: - print(text, file=sys.stderr) + sys.stderr.write(str(text)+"\n") + sys.stderr.flush() def resize(self, width, height): print('\033[8;{};{}t'.format(height, width))