Message218628
To avoid further problems may I also recommend documenting how exactly people are supposed to wrap sys.stdout and so forth. Clearly putting a StringIO there is insufficient as StringIO does not have a buffer.
Something like this maybe?
import io
buf = io.BytesIO()
sys.stdout = io.TextIOWrapper(buf,
encoding='utf-8',
errors='strict', # or surrogate-escape as this is the default for stdout now? not sure
line_buffering=True
) |
|
Date |
User |
Action |
Args |
2014-05-15 20:44:56 | aronacher | set | recipients:
+ aronacher, pitrou, benjamin.peterson, stutzbach, r.david.murray, flox, python-dev, hynek, martin.panter |
2014-05-15 20:44:56 | aronacher | set | messageid: <1400186696.42.0.554658773365.issue21364@psf.upfronthosting.co.za> |
2014-05-15 20:44:56 | aronacher | link | issue21364 messages |
2014-05-15 20:44:56 | aronacher | create | |
|