>Is there a way of setting O_DIRECT on a preexisting file like sys.stdin?
>
>Does C allow this sort of thing?

There is no O_DIRECT or fcntl() in Standard C.

fcntl() operates on an open file descriptor, and the file descriptor
for stdin is 0.  Two calls to fcntl(), one with F_GETFL and one
with F_SETFL, would do what you want.

I'm not sure why you want to do that, though.  It's not going to
get you character-at-a-time I/O, if that's what you want.

                                                Gordon L. Burditt
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to