Roy Assis <royass...@gmail.com> added the comment:

Resolution in this post:
https://stackoverflow.com/questions/26692284/how-to-prevent-brokenpipeerror-when-doing-a-flush-in-python/26738736

code was changed to:
----
#sample.py
import sys
from time import sleep

try:
    for line in sys.stdin:
        print(line, flush=True)
        sleep(2)
except:
    sys.stderr.close()
    pass

----------
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue46492>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to