Another Socket in Python

Erik Max Francis max at alcyone.com
Sat Aug 17 14:01:36 EDT 2002


Steven wrote:

> IIRC one thing to remember with select is that  you don't pass the
> actual
> socket in a list, you pass the file descriptor/number. You can get
> this by
> using the socket objects fileno() method.

That's not true in Python's implementation of select; the lists passed
in can be integers (representing file descriptors) or socket objects
(actually, any objects supporting a .fileno method).

-- 
 Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
 __ San Jose, CA, US / 37 20 N 121 53 W / ICQ16063900 / &tSftDotIotE
/  \ There is nothing so subject to the inconstancy of fortune as war.
\__/ Miguel de Cervantes
    Church / http://www.alcyone.com/pyos/church/
 A lambda calculus explorer in Python.



More information about the Python-list mailing list