Is there a way to specify the color a text is printed within Idle for Python 3.2?
I’m looking for something like:
print("foo", "#fafafa")
print("bar", "#4f4f4f")
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
http://docs.python.org/library/idle.html#syntax-colors
Edit: As you’ve edited your question, here is an edited answer. See
http://www.daimi.au.dk/~mailund/scripting2005/lecture-notes/process-management.html
for how to use terminal escape sequences in Python to change the color of things.
Will they work in IDLE? I don’t know. But they will work in most terminals.