Message239163
| Author |
eryksun |
| Recipients |
BreamoreBoy, dabrahams, eryksun, loewis, ncoghlan, piotr.dobrogost, pitrou, r.david.murray, sbt, steve.dower, tim.golden, zach.ware |
| Date |
2015年03月24日.18:04:49 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1427220289.46.0.69383230999.issue15244@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
> you can't mix CRT methods with OS methods because the CRT does its
> own buffering
Python 3's io uses the CRT's low I/O (ioinfo struct) in binary mode. It appears that the buffers pipech, pipech2, and dbcsbuffer are only used in text mode. So it should be generally OK to call get_osfhandle and use Win32 directly, if that's ever required.
Of course, as this patch demonstrates, an io opener (3.3+) can call open_osfhandle immediately after CreateFile, and nothing else changes. This could be added to io / _pyio in 3.5. Initially it could simply be a pure-Python function that uses _winapi and msvcrt. 3.6 could get a C implementation in _iomodule.c. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2015年03月24日 18:04:49 | eryksun | set | recipients:
+ eryksun, loewis, ncoghlan, pitrou, tim.golden, r.david.murray, dabrahams, BreamoreBoy, sbt, piotr.dobrogost, zach.ware, steve.dower |
| 2015年03月24日 18:04:49 | eryksun | set | messageid: <1427220289.46.0.69383230999.issue15244@psf.upfronthosting.co.za> |
| 2015年03月24日 18:04:49 | eryksun | link | issue15244 messages |
| 2015年03月24日 18:04:49 | eryksun | create |
|