Convert an IP address from its family-specific string format to a packed, binary format.
inet_pton() is useful when a library or network protocol calls for an object of type
struct in_addr (similar to
Supported values for address_family are currently
AF_INET6. If the IP address string ip_string is invalid,
OSError will be raised. Note that exactly what is valid depends on both the value of address_family and the underlying implementation of
Availability: Unix (maybe not all platforms), Windows.
Changed in version 3.4: Windows support added