[Python-Dev] fp vs. fd
Andrew Kuchling
akuchlin@mems-exchange.org
Tue, 6 Feb 2001 15:31:29 -0500
On Tue, Feb 06, 2001 at 02:14:46PM -0500, Eric S. Raymond wrote:
>See the fctl() module. I thought this was also true of select() and
>poll(), but I see the docs on this are different than the last time I
>looked and conclude that either docs or code or both have changed.
I think poll() and select() are happy with either an integer or an
object that has a .fileno() method returning an integer, thanks to the
PyObject_AsFileDescriptor() function in the C API that I added a while
ago. Probably the fcntl module should also be changed to use
PyObject_AsFileDescriptor() instead of requiring only an int. File a
bug on SourceForge so this doesn't get forgotten before 2.1final; this
is a minor tidying that's worth doing.
--amk