views:

36

answers:

1
read, write, error = select.select(sockets, sockets, sockets, 60.0)

What is recommended if something ends up in the error list?

+1  A: 

On the operating systems I know, there's nothing you can do with the sockets suffering "exceptional conditions", except trying to close them (which may raise an exception, so be sure to use a try/except around the attempt). You know that the connections those sockets stood for have terminated abnormally, and may want to write some log information about that, show the problem to the user, or the like. In some situations, it may be appropriate to try to establish those connections again (this may of course fail, depending on what exceptional condition was encountered, so be prepared for that).

Alex Martelli
Thanks; I was wondering why I didn't see any reference to handling these - it's because there isn't much to handle. :)
synapz
@synapz, you're welcome, but, yes, I don't believe there's much handling possible, at least not on the OS's I know (but, there may be other OS's;-). BTW, what's with the accept (tx!) but no upvote? Pretty peculiar...!-)
Alex Martelli
Oops! Done and done. :)
synapz