{ } Raw JSON

bundles / astropy latest / astropy / extern / configobj / validate / dottedQuadToNum

function

astropy.extern.configobj.validate:dottedQuadToNum

source: /astropy/extern/configobj/validate.py :274

Signature

def   dottedQuadToNum ( ip )

Summary

Convert decimal dotted quad string to long integer

Extended Summary

>>> int(dottedQuadToNum('1 '))
1
>>> int(dottedQuadToNum(' 1.2'))
16777218
>>> int(dottedQuadToNum(' 1.2.3 '))
16908291
>>> int(dottedQuadToNum('1.2.3.4'))
16909060
>>> dottedQuadToNum('255.255.255.255')
4294967295
>>> dottedQuadToNum('255.255.255.256')
Traceback (most recent call last):
ValueError: Not a good dotted-quad IP: 255.255.255.256

Aliases

  • astropy.config.configuration.validate.dottedQuadToNum