On Dec 1, 3:06 pm, Terry Reedy wrote:
> def print(s): return sys.stdout.buffer.write(s.encode('utf-8'))
Here is a better solution that lets me send any string to the
function:
def print(html): return sys.stdout.buffer.write(("Content-type:text/
plain;charset=utf-8\n\n"+html).encode('utf-8'))
Why this changed in Python 3 I do not know, nor why it was nowhere to
be found on the internet.
Can anyone explain it?
Anyway, I hope others with this problem can find this solution.
-- Gnarlie
--
http://mail.python.org/mailman/listinfo/python-list