Logo Search packages:      
Sourcecode: virt-manager version File versions  Download package

def virtManager::IPy::IPint::strHex (   self,
  wantprefixlen = None 
)

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

Definition at line 486 of file IPy.py.

00486                                           :
        """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
        """

        if self.WantPrefixLen == None and wantprefixlen == None:
            wantprefixlen = 0

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

    def strDec(self, wantprefixlen = None):


Generated by  Doxygen 1.6.0   Back to index