Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Changing Shell Text Color (Windows) [duplicate]

I'm looking for a way to change the color of the text output from my python scripts as it runs. The basic idea is something like this:

if (Data < LowerLimit):     print "Failed" # Output Failed as Red Text elif (Data > UpperLimit):     print "Failed" # Red Color else:     print "Passed" # Blue Color 

The scripts are being used on windows machines for quick data analysis.

like image 591
CyanRook Avatar asked Jun 30 '11 15:06

CyanRook


People also ask

How do I change text color in Terminal windows?

Switching to a different color schemeSelect Settings, and the settings. json file will open in your default text editor. This file is where you can define various options per window or per profile. To demonstrate, let's change the color scheme for the Command Prompt profile.

How do you change the color of text in Python shell?

Method 1: Using ANSI ESCAPE CODE To add color and style to text, you should create a class called ANSI, and inside this class, declare the configurations about the text and color with code ANSI. Functions Used: background: allows background formatting.

How do I change the color code in C++?

If You want to change the Text color in C++ language There are many ways. In the console, you can change the properties of output. click this icon of the console and go to properties and change color. The second way is calling the system colors.


1 Answers

Or about the best module I have found http://pypi.python.org/pypi/colorama

like image 70
Jakob Bowyer Avatar answered Sep 22 '22 08:09

Jakob Bowyer