An IPAddr object represents an IPv4 or IPv6 address.
| address) |
ipv6_enabled() returns True.
Examples:
>>> addr1 = IPAddr('192.160.1.1')
>>> addr2 = IPAddr('2001:db8::1428:57ab')
>>> addr3 = IPAddr('::ffff:12.34.56.78')
>>> addr4 = IPAddr(0xffffffff)
>>> addr5 = IPAddr(0xffffffffffffffffffffffffffffffff)
Supported operations:
| Operation | Result |
|---|---|
addr1 < addr2 |
addr1 is considered less than addr2 if the 128-bit representation of addr1 is less than addr2 |
int(addr1) |
The integer representation of addr |
Instance methods:
| ) |
| ) |
str(addr) returns a
human-readable representation of that address.