On Thu, Feb 7, 2013 at 6:08 PM, Paul Rubin <no.email@nospam.invalid> wrote:
> Any idea of a good way to map the file descriptors back to socket
> objects?  Is there some kind of hidden interface that I don't know
> about, that gives back sockets directly?

I don't know of any, but you can get the file descriptor from a socket
via fileno(), and build your own dictionary:

fd_to_sock={sock.fileno():sock for sock in list_of_sockets}

You'd need to manually maintain that as sockets get created/destroyed, though.

ChrisA
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to