From 5110a16cc85ad895521a9945d63da63a866953aa Mon Sep 17 00:00:00 2001 From: PBW99 Date: Thu, 26 Oct 2023 09:20:43 +0900 Subject: [PATCH] wip: use print without access to sys --- client/python/gamium/gamium/internal/logger.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/client/python/gamium/gamium/internal/logger.py b/client/python/gamium/gamium/internal/logger.py index 9da6b17..5771c56 100644 --- a/client/python/gamium/gamium/internal/logger.py +++ b/client/python/gamium/gamium/internal/logger.py @@ -1,5 +1,3 @@ -import sys - class Logger: def __init__(self): self._printable = ConsolePrintable() @@ -28,12 +26,10 @@ def verbose(self, message): self._printable.verbose(message) def dot(self): - sys.stdout.write(".") - sys.stdout.flush() + print(".", end="", flush=True) def newline(self): - sys.stdout.write("\n") - sys.stdout.flush() + print("", end="\n", flush=True) class ConsolePrintable: @@ -54,3 +50,4 @@ def debug(self, message): def verbose(self, message): print(f"VERBOSE: {message}") +