Not sure I follow, but yeah: select reports the state of the file-descriptor.  While the descriptor is readable, every call to select will indicate that it's readable, etc. 





Shane Green 
www.umbrellacode.com
805-452-9666 | shane@umbrellacode.com

On Oct 14, 2012, at 5:48 AM, Richard Oudkerk <shibturn@gmail.com> wrote:

On 14/10/2012 6:29am, Greg Ewing wrote:
Not sure if this is relevant, but I'd just like to point out
that the behaviour of select() in this respect is actually
*edge triggered* by this definition. Once it has reported that
a given file descriptor is ready, it *won't* report that file
descriptor again until you do something with it. This can be
a subtle source of bugs in select-based code if you're not
aware of it.

Unless I have misunderstood you, the following example contradicts that:

>>> import os, select
>>> r, w = os.pipe()
>>> os.write(w, b"hello")
5
>>> select.select([r], [], [])
([3], [], [])
>>> select.select([r], [], [])
([3], [], [])

--
Richard

_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
http://mail.python.org/mailman/listinfo/python-ideas