def dottedQuadToNum(ip):
    "convert decimal dotted quad string to long integer"

    hexn = ''.join(["%02X" % long(i) for i in ip.split('.')])
    return long(hexn, 16)
convert decimal dotted quad string to long integer
recipes/Python/65219_IP_address_conversion_functions/recipe-65219.py