def is_ip_addr(self, ipstr):
        """
        Convenience method to verify if string is an IP addr?
        :param ipstr: Stinrg containing IP address
        :rtype True if string is a valid IP address
        """
        ipstr_chunks = ipstr.split('.')
        if len(ipstr_chunks) != 4:
            return False
        for ipstr_chunk in ipstr_chunks:
            if not ipstr_chunk.isdigit():
                return False
            ipno_part = int(ipstr_chunk)
            if ipno_part < 0 or ipno_part > 255:
                return False
        return True
def is_ip_addr ( self , ipstr ) : ipstr_chunks = ipstr . split ( '.' ) if len ( ipstr_chunks ) != 4 : return False for ipstr_chunk in ipstr_chunks : if not ipstr_chunk . isdigit ( ) : return False ipno_part = int ( ipstr_chunk ) if ipno_part < 0 or ipno_part > 255 : return False return True
Convenience method to verify if string is an IP addr?
        :param ipstr: Stinrg containing IP address
        :rtype True if string is a valid IP address