On 4 Mag, 19:18, Francesco Bochicchio <[EMAIL PROTECTED]> wrote:
> On Sun, 04 May 2008 08:49:55 -0700, Giampaolo Rodola' wrote:
> > Hi there,
> > since the socket.socket.family attribute has been introduced only in
> > Python 2.5 and I need to have my application to be backward compatible
> > with
On Sun, 04 May 2008 08:49:55 -0700, Giampaolo Rodola' wrote:
> Hi there,
> since the socket.socket.family attribute has been introduced only in
> Python 2.5 and I need to have my application to be backward compatible
> with Python 2.3 and 2.4 I'd like to know how could I determine the
> family of
2008/5/4, Giampaolo Rodola' <[EMAIL PROTECTED]>:
> For now I've been able to determine the family by using:
>
> # self.socket = a connected socket.socket instance
> ip, port = self.socket.getsockname()[0:2]
> af = socket.getaddrinfo(ip, port)[0][0]
>
> ...but I'd like to know if some other sol
Hi there,
since the socket.socket.family attribute has been introduced only in
Python 2.5 and I need to have my application to be backward compatible
with Python 2.3 and 2.4 I'd like to know how could I determine the
family of a socket.socket instance which may be AF_INET or AF_INET6.
Is there some