POLL in different OSes

Fredrik Lundh fredrik at pythonware.com
Tue Oct 23 14:08:16 EDT 2001


Gerhard Häring wrote:
> Wouldn't it be possible to emulate poll() with select()? I'd be glad to
> see a patch appear at Sourceforge if that's possible :-)

why bother?

if you have Python code that uses poll, you usually need about
ten lines of Python glue to make that code use select instead
(poll takes/returns a list of file/flag tuples, select two separate
lists).

see asyncore.py for an example.

(the Python library tends to avoid approximating one system call
with another.  better leave that to the application programmer,
who's the only one who knows the exact requirements.)

</F>





More information about the Python-list mailing list