>> I do wonder why you need a binary representation of an IPv6 address... > I'd like to subscribe to an IPv6 multicast address via > socket.setsockopt(IPPROTO_IPV6, IPV6_JOIN_GROUP, binary_address).
I see. >> Yes, writing your own routine is certainly an option. > Is it the preferred one? Preferred by whom? I would prefer to pass a socket.ipv6_mreq structure to IPV6_JOIN_GROUP, rather than a byte array. Failing that, I would prefer to use inet_pton. Since the first one is not implemented, and the second one not on Windows, I would prefer to receive patches that make them implemented. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list