'Return a string representation in hex format.
>>> print IP(\'127.0.0.1\').strHex()
0x7F000001
>>> print IP(\'2001:0658:022a:cafe:0200::1\').strHex()
0x20010658022ACAFE0200000000000001'

def strHex(self, wantprefixlen=None):

    if ((self.WantPrefixLen is None) and (wantprefixlen is None)):
        wantprefixlen = 0
    x = hex(self.ip)
    if (x[(-1)] == 'L'):
        x = x[:(-1)]
    return (x + self._printPrefix(wantprefixlen))
