[Tutor] display text in colors
LandSurveyor
chiselchip at earthlink.net
Mon Jan 1 18:04:27 CET 2007
I would like to direct a python script to display 'print' strings in various (chosen) colors; for example:
print \
"""
color this line blue # in the printout display-be it screen or hardcopy
color this line green # in the printout display-be it screen or hardcopy
"""
what I tried doing was:
import os
then the line...<os.system('\[\e[31;1m\]')> just before the print command (I borrowed this formatting from my $PS1 format.
Nadda. Didn't work. What might I try?
More information about the Tutor
mailing list