Windows NT select.select( )
David Cattarin
dittoC at ix.netcom.com
Tue Jul 18 14:37:57 EDT 2000
I recently had to write an EventLoop class to replace the
asyncore.poll( ) function since I need to support timers
as well as sockets in my application. There was an oddity
under Windows NT that when no sockets were registered to
the socket_map select failed. This code worked fine under
UNIX. For example, select( [ ], [ ], [ ], 5 ) will
raise a "file does not exist" error under Windows NT.
Has anyone else noticed this? I've worked around it by
creating an unconnected socket and placing it in the
exception list; ie. select( [ ], [ ], [ s ], 5 ). This
allows the code to work under Windows and UNIX.
I am using Python 1.5.2, the precompiled version. I am
pretty sure it is just a Windows NT oddity and not a
Python problem, but I was curious if anyone knew more.
Or even a better way to fix this.
Thanks for your help.
--
Ditto
In the English language two positives never form a negative.
"Yeah, right."
Sent via Deja.com http://www.deja.com/
Before you buy.
More information about the Python-list
mailing list