Print output with color style in GDB python script?

170 Views Asked by At

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.

https://sourceware.org/gdb/onlinedocs/gdb/Python-API.html

0

There are 0 best solutions below