I'd like to call print('somestr') in a python script called in GDB ((gdb) source my_script.py), and style the output in console colors. I tried the python colorama package which works in terminal, but not when invoking from GDB. Is there a way to print in colors in GDB python script? Haven't got any clue from the Python API below.
print("normal \x1b[31;1mred\x1b[m normal").