I want to do getpeername() on stdin.  I know I can do this by wrapping a socket 
object around stdin, with

s = socket.fromfd(sys.stdin.fileno(), family, type)

but that requires that I know what the family and type are.   What I want to do 
is discover the family and type by looking at what getpeername() and/or 
getsockname() return.  Can this be done with the standard library?

---
Roy Smith
r...@panix.com



-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to