Robpol86 / terminaltables

Project no longer maintained.
https://github.com/matthewdeanmartin/terminaltables
MIT License
689 stars 70 forks source link

Write bytes to underluing buffer of stdout #71

Open arcresu opened 4 years ago

arcresu commented 4 years ago

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.