From 56827fb2c485a39ce13e3ac61bc976adb93fe67b Mon Sep 17 00:00:00 2001 From: MS Date: Tue, 2 Apr 2024 18:45:57 -0400 Subject: [PATCH] Use colorama.just_fix_windows_console (#766) --- tools/datacmp.py | 2 +- tools/decomplint/decomplint.py | 2 +- tools/reccmp/reccmp.py | 2 +- tools/requirements.txt | 2 +- tools/vtable/vtable.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/datacmp.py b/tools/datacmp.py index 28895876..7073fc09 100644 --- a/tools/datacmp.py +++ b/tools/datacmp.py @@ -16,7 +16,7 @@ from isledecomp.bin import Bin as IsleBin import colorama -colorama.init() +colorama.just_fix_windows_console() # Ignore all compare-db messages. diff --git a/tools/decomplint/decomplint.py b/tools/decomplint/decomplint.py index cfe9155b..6c7c1b4c 100755 --- a/tools/decomplint/decomplint.py +++ b/tools/decomplint/decomplint.py @@ -7,7 +7,7 @@ from isledecomp.dir import walk_source_dir, is_file_cpp from isledecomp.parser import DecompLinter -colorama.init() +colorama.just_fix_windows_console() def display_errors(alerts, filename): diff --git a/tools/reccmp/reccmp.py b/tools/reccmp/reccmp.py index e77020cc..84266773 100755 --- a/tools/reccmp/reccmp.py +++ b/tools/reccmp/reccmp.py @@ -19,7 +19,7 @@ from pystache import Renderer import colorama -colorama.init() +colorama.just_fix_windows_console() def gen_json(json_file: str, orig_file: str, data): diff --git a/tools/requirements.txt b/tools/requirements.txt index 61249c09..3f5e4e84 100644 --- a/tools/requirements.txt +++ b/tools/requirements.txt @@ -1,7 +1,7 @@ tools/isledecomp capstone clang==16.* -colorama +colorama>=0.4.6 isledecomp pystache pyyaml diff --git a/tools/vtable/vtable.py b/tools/vtable/vtable.py index c5dc27a7..aa294659 100755 --- a/tools/vtable/vtable.py +++ b/tools/vtable/vtable.py @@ -12,7 +12,7 @@ # Ignore all compare-db messages. logging.getLogger("isledecomp.compare").addHandler(logging.NullHandler()) -colorama.init() +colorama.just_fix_windows_console() def parse_args() -> argparse.Namespace: