You are here : python_3socketsocketinet_pton

socket.inet_pton() - socket

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
inet_aton()) or struct in6_addr.


Syntax

socket.inet_pton(address_family, ip_string)


Example


Output / Return Value


Limitations


Alternatives / See Also


Reference