[Python-Dev] Placement of os.fdopen functionality

Tim Peters tim.one@comcast.net
Thu, 10 Apr 2003 23:02:06 -0400

[Greg Ewing]
> Hmmm, I wasn't sure whether fileno() was a required part of stdio, or
> whether it only existed on unix-like systems. If it really is
> required, I guess it doesn't have to be in the os module.

It's not required by standard C -- standard C has only streams, not file
descriptors.  Nevertheless, POSIX requires them, and uses of fileno() in
Python are unconditional (aren't conditionally compiled depending on config
symbols), so they're on every platform Python links on today.