Re: getpeername() on stdin?

2013-11-02 Thread Nobody
On Fri, 01 Nov 2013 14:55:38 -0400, random832 wrote: If it's possible to get this information with only the fd, then why does socket.fromfd require them? The only person who can answer that is whoever came up with socket.fromfd() in the first place. I initially suspected that it might have

Re: getpeername() on stdin?

2013-11-01 Thread random832
On Thu, Oct 31, 2013, at 21:12, Nobody wrote: On Thu, 31 Oct 2013 12:16:23 -0400, Roy Smith wrote: 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

Re: getpeername() on stdin?

2013-11-01 Thread Roy Smith
In article mailman.1937.1383332149.18130.python-l...@python.org, random...@fastmail.us wrote: On Thu, Oct 31, 2013, at 21:12, Nobody wrote: On Thu, 31 Oct 2013 12:16:23 -0400, Roy Smith wrote: I want to do getpeername() on stdin. I know I can do this by wrapping a socket object

getpeername() on stdin?

2013-10-31 Thread Roy Smith
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

Re: getpeername() on stdin?

2013-10-31 Thread Nobody
On Thu, 31 Oct 2013 12:16:23 -0400, Roy Smith wrote: 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