preserving color ouput of a shell command via os.popen()

Gabriel Genellina gagsl-py at yahoo.com.ar
Tue Sep 26 22:38:24 EDT 2006


At Tuesday 26/9/2006 23:07, zeezlo at yahoo.com wrote:

>I would like to get the output of a shell process on Linux (eg, "ls
>--color=auto") run via os.popen(), filter it and then output parts of
>it while preserving any original coloring added by that process.

Yes, just omit the =auto (or use --color=always)
auto means "use colors *only* when *not* redirected"



Gabriel Genellina
Softlab SRL 


	
	
		
__________________________________________________
Preguntá. Respondé. Descubrí.
Todo lo que querías saber, y lo que ni imaginabas,
está en Yahoo! Respuestas (Beta).
¡Probalo ya! 
http://www.yahoo.com.ar/respuestas




More information about the Python-list mailing list