Flush stdin

Dan Stromberg drsalists at gmail.com
Mon Oct 20 23:59:29 CEST 2014


On Sun, Oct 19, 2014 at 9:45 PM, Marko Rauhamaa <marko at pacujo.net> wrote:
> I found this comment in CPython's source code (pythonrun.c):
>
>     /* stdin is always opened in buffered mode, first because it shouldn't
>        make a difference in common use cases, second because TextIOWrapper
>        depends on the presence of a read1() method which only exists on
>        buffered streams.
>     */
>
> The solution is to use os.read().

Seriously?



More information about the Python-list mailing list