OK, I (sort of) tried that. Used chr() to avoid issues of which editor and
rant the following:
import sys
ESC = chr(27)
DarkRed = ESC + "[31;2m"
ResetColour = ESC + "[0m"
print "Initial colour"
sys.stdout.write(DarkRed) ; sys.stdout.flush()
print "Is this dark red?"
sys.stdout.write(ResetCo
"Bill Davy" <[EMAIL PROTECTED]> wrote in
news:[EMAIL PROTECTED]:
> To make life easier for my users, I'd like to colour my prompt string
> (as handed to raw_input()) a different colour to that produced by
> print. I'm using Python 2.4.1 and IDLE 1.1.1 on Windows XP. Is it
> possible, and if so,
Thank you Nathan, but that does not quite address my question. I want to
have code in Python so
make_the_prompt_string(Red)
make_print_output(Green)
while True:
s = raw_input("This prompt (which is really several lines long) will be
in red: ")
Foo(s)
print "And the result is in Gree
Bill.
The way is the click on view, then click script checker, or something like
that. It will color code the text for you.
Nathan
"Bill Davy" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> To make life easier for my users, I'd like to colour my prompt string
(as
> ha
To make life easier for my users, I'd like to colour my prompt string (as
handed to raw_input()) a different colour to that produced by print. I'm
using Python 2.4.1 and IDLE 1.1.1 on Windows XP. Is it possible, and if so,
how?
tia,
Bill
--
http://mail.python.org/mailman/listinfo/pytho