On Oct 26, 2010, at 3:15, Arnau Sanchez <pyar...@gmail.com> wrote:

> On Mon, 25 Oct 2010 19:09:04 -0400 Jose Caballero wrote:
> 
>> import time
>> for i in range(3):
>>        print time.time()
>>        time.sleep(3)
> 
> Como bien comentaba Ricardo, aquí tenías buffering en la fuente. ¿Pero que
> hubiera pasado si no hubieras podido modificar el script para poner el flush?
> 
> Una opción:
> 
>  Popen("python -u tuscript.py", ...)
> 
> Otra (requiere stdbuf):
> 
>  Popen("stdbuf -oL python tuscript.py", ...)
> 
> http://www.pixelbeat.org/programming/stdio_buffering/
> 

Muy interesante. Muchas gracias por el apunte.

Saludos,
Jose
_______________________________________________
Python-es mailing list
Python-es@python.org
http://mail.python.org/mailman/listinfo/python-es
FAQ: http://python-es-faq.wikidot.com/

Responder a