Print Color Highlighted Strings To Unix Terminal
Join the DZone community and get the full member experience.Join For Free
Sample of escape sequences needed to print in color to unix/linux terminal.
print x.replace('toostis', '\033[0;31mtoostis\033[m')This will highlight all 'toostis' instances in x with red.
Opinions expressed by DZone contributors are their own.