From e332ddb5b416dc392e144a8f055595baea39d848 Mon Sep 17 00:00:00 2001 From: Stephanos Ioannidis Date: Mon, 23 May 2022 19:20:15 +0900 Subject: [PATCH] scripts: tracing: Initialise Colorama during module load This commit adds a call to the Colorama initialisation function during the module execution so that ANSI color sequences are properly converted to the relevant Win32 API calls on the Windows. Signed-off-by: Stephanos Ioannidis --- scripts/tracing/parse_ctf.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/tracing/parse_ctf.py b/scripts/tracing/parse_ctf.py index 5b52bffa332..dac1539ba4f 100644 --- a/scripts/tracing/parse_ctf.py +++ b/scripts/tracing/parse_ctf.py @@ -20,6 +20,7 @@ Generate trace using samples/subsys/tracing for example: import sys import datetime +import colorama from colorama import Fore import argparse try: @@ -38,6 +39,8 @@ def parse_args(): return args def main(): + colorama.init() + args = parse_args() msg_it = bt2.TraceCollectionMessageIterator(args.trace)