I have linux server where I am running python script on server console my script colors are not displaying. Same script is working on Putty sessions.
I have checked echo $TERM in putty it is "xterm" and server console it is "linux".
OKBLUE = '\033[94m'
OKGREEN = '\033[92m'
WARNING = '\033[93m'
FAIL = '\033[91m'
ENDC = '\033[0m'
BOLD = '\033[1m'
UNDERLINE = '\033[4m'
import os
import subprocess
from subprocess import check_output
from subprocess import call
import sys
import time
from shutil import copyfile
import commands
print OKGREEN + "Testing Green" + ENDC
I have also tried below setting up "os.system('export TERM="xterm"')" in python script but not working
Could some one help me to fix this issue.
Version: 2.7
Note: In same server console vim is displaying with colors