homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eryksun
Recipients aronacher, eryksun
Date 2014年04月27日.16:21:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1398615674.3.0.74282725447.issue21363@psf.upfronthosting.co.za>
In-reply-to
Content
It works if you detach the buffer beforehand:
 >>> import io, sys
 >>> stdin = sys.stdin
 >>> stdin.flush()
 >>> correct_stdin = io.TextIOWrapper(stdin.buffer, 'utf-8')
 >>> correct_stdin.readline()
 foobar
 'foobar\n'
 >>> correct_stdin.detach()
 <_io.BufferedReader name='<stdin>'>
 >>> del correct_stdin
 >>> stdin.readline()
 foobar
 'foobar\n'
History
Date User Action Args
2014年04月27日 16:21:14eryksunsetrecipients: + eryksun, aronacher
2014年04月27日 16:21:14eryksunsetmessageid: <1398615674.3.0.74282725447.issue21363@psf.upfronthosting.co.za>
2014年04月27日 16:21:14eryksunlinkissue21363 messages
2014年04月27日 16:21:14eryksuncreate

AltStyle によって変換されたページ (->オリジナル) /