I have the following code:
p = subprocess.Popen(cmd.split(' '), env=os.environ, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
while(True):
log.info(p.stdout.readline())
if(p.poll() is not None):
break
Which works ok, except for the fact that it removes all color issued. Is there a way to retain this?