[Python-ideas] BufferedIO and detach

random832 at fastmail.us random832 at fastmail.us
Wed Mar 6 16:25:54 CET 2013


On Tue, Mar 5, 2013, at 5:03, Robert Collins wrote:
> Suggests you can indeed get key events from ReadConsoleInput. I don't
> know what redirected input does in that case.

Redirected I/O does not, in general, work with console functions. (I
haven't tried ReadConsoleInput, but even ReadConsole [which returns
characters] and WriteConsole don't work). You would have to detect
whether the standard input(/output/etc) handle is a console and behave
differently depending on if it is or not.



More information about the Python-ideas mailing list