This might be answered already but I could not figure out a good way to phrase it to look for an answer so I hope you'll bear with me.
I want to change the color of the text output on Terminal if it comes back from running a program. Ex: I make a script called test.py that just prints "Hello World!" and run this by entering
Now this will come back with
Hello World! but it's hard to distinguish what's output from the program than from what was written by Terminal since they have same font and color and the terminal may look all convoluted like
User$ ls FolderA FolderB python_test.py random_test.py User$ cd User$ python test.py ImportError: No module name test User$ vim test.py Error detected while processing /User/.vimrc: line xx XXX: Something Something Press Enter to Continue Hello World! Error Undefined Something something. User$ cd /User/python/xxx.py
It's hard to debug, look at error messages, see the output of the script to decipher what is happening in the terminal, etc. I was wondering if it was possible to set it up so that each of the messages will come back in different color such that usual Terminal console messages are in black font, any error messages comes back in red font and the output from the script, say "Hello World!" comes back in green font.