Python 3 is not so much a fan of writing a str to a pipe buffer.