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 <root@stephanos.io>
This commit is contained in:
Stephanos Ioannidis 2022-05-23 19:20:15 +09:00 committed by Marti Bolivar
commit e332ddb5b4

View file

@ -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)