re-opening stdin in raw (binary) mode?

bjorn bjorn at roguewave.com
Mon Jan 17 18:00:51 EST 2000


"Samuel A. Falvo II" wrote:

> In article <388388c9.12001026 at news.iol.ie>, Sean Mc Grath wrote:
> >The subject says it all. Can some kind soul shed light
> >on how to re-open sys.stdin in raw mode?
>
> If memory serves me correctly, I don't have the complete answer you're
> looking for, but under Linux, you can perform an ioctl() on file descriptor
> 1 (or is it 0?) to set a binary-mode flag.

Don't you just close it, and then posix.fdopen it (I can't remember if it's 0
or 1 either...)

-- bjorn





More information about the Python-list mailing list