netwatch.py/netaddr-0.7.10/netaddr/tests/3.x/ip/formats.txt

28 lines
318 B
Plaintext

=IP formatting options=
Copyright (c) 2008-2012, David P. D. Moss. All rights reserved.
{{{
>>> from netaddr import *
}}}
==IPAddress representations==
{{{
>>> hex(IPAddress(0))
'0x0'
>>> hex(IPAddress(0xffffffff))
'0xffffffff'
>>> oct(IPAddress(0))
'0o0'
>>> oct(IPAddress(0xffffffff))
'0o37777777777'
}}}