[Python-es] ¿cómo ver el stdout en tiempo real?

Abraham Zamudio abraham.zamudio en gmail.com
Mar Oct 26 01:57:36 CEST 2010


Buen hilo , felicitaciones a todos .

2010/10/25 Jose Caballero <jcaballero.hep en gmail.com>

>
>
>>
>> Ya estoy más cerca de resolver mi problema  =>  me queda por averiguar
>> como capturar el return code del comando ejecutado con Popen()
>>
>>
> Vale, ya lo tengo.
>
>
> popen = subprocess.Popen(command, stdout=subprocess.PIPE)
> for line in iter(popen.stdout.readline, ""):
>    print line,
>
> print open.wait()  # espera hasta que el proceso hijo termina y devuelve el
> RC
>
>
>
>
> _______________________________________________
> Python-es mailing list
> Python-es en python.org
> http://mail.python.org/mailman/listinfo/python-es
> FAQ: http://python-es-faq.wikidot.com/
>
>


-- 
Abraham Zamudio Ch.
------------ próxima parte ------------
Se ha borrado un adjunto en formato HTML...
URL: <http://mail.python.org/pipermail/python-es/attachments/20101025/a1a05b32/attachment.html>


Más información sobre la lista de distribución Python-es