This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author royroy
Recipients royroy
Date 2022-01-23.20:08:54
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1642968534.24.0.109092108394.issue46492@roundup.psfhosted.org>
In-reply-to
Content
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
History
Date User Action Args
2022-01-23 20:08:54royroysetrecipients: + royroy
2022-01-23 20:08:54royroysetmessageid: <1642968534.24.0.109092108394.issue46492@roundup.psfhosted.org>
2022-01-23 20:08:54royroylinkissue46492 messages
2022-01-23 20:08:54royroycreate