Skip to content
This repository has been archived by the owner on Dec 7, 2021. It is now read-only.

Write bytes to underluing buffer of stdout #71

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

arcresu
Copy link

@arcresu arcresu commented Nov 12, 2019

This was adapted from an example in the python docs and solves test failures seen on the CI. We need to write to the underlying buffer object of the stream, but in case sys.stdout was replaced with a file-like object without a buffer there's a fallback to direct writing.

This was adapted from an example in the python docs and solves test failures seen on the CI. We need to write to the underlying buffer object of the stream, but in case `sys.stdout` was replaced with a file-like object without a buffer there's a fallback to direct writing.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant