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 steve.dower
Recipients Segev Finer, eryksun, paul.moore, steve.dower, tim.golden, zach.ware
Date 2017-06-02.17:59:01
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1496426341.56.0.251636029333.issue30555@psf.upfronthosting.co.za>
In-reply-to
Content
> We can also switch to calling _get_osfhandle always instead of caching the handle, it will break when the fd is redirected to a non-console. But so does _WindowsConsoleIO in general since it will try to continue writing to the console despite the redirection, meaning that Python code doing redirection has to handle sys.std* anyhow.

This might be the best approach, ultimately. I bet there's an optimization here, though it's not obvious.

Probably the main issue here is readline not properly handling sys.std*. If that was fixed, I think many of these problems (at least at the interactive prompt) would simply go away.
History
Date User Action Args
2017-06-02 17:59:01steve.dowersetrecipients: + steve.dower, paul.moore, tim.golden, zach.ware, eryksun, Segev Finer
2017-06-02 17:59:01steve.dowersetmessageid: <1496426341.56.0.251636029333.issue30555@psf.upfronthosting.co.za>
2017-06-02 17:59:01steve.dowerlinkissue30555 messages
2017-06-02 17:59:01steve.dowercreate