def inet_aton(text):
 parts = text.split('.')
 if (len(parts) != 4):
  raise dns.exception.SyntaxError
 for part in parts:
  if (not part.isdigit()):
   raise dns.exception.SyntaxError
  if ((len(part) > 1) and (part[0] == '0')):
   raise dns.exception.SyntaxError
 try:
  bytes = [int(part) for part in parts]
  return struct.pack('BBBB', *bytes)
 except:
  raise dns.exception.SyntaxError

def inet_aton ( text ) : parts = text . split ( '.' ) if ( len ( parts ) != 4 ) : raise dns . exception . SyntaxError for part in parts : if ( not part . isdigit ( ) ) : raise dns . exception . SyntaxError if ( ( len ( part ) > 1 ) and ( part [ 0 ] == '0' ) ) : raise dns . exception . SyntaxError try : bytes = [ int ( part ) for part in parts ] return struct . pack ( 'BBBB' , * bytes ) except : raise dns . exception . SyntaxError
inet_aton -> packed 32-bit ip representation convert an ip address in string format to the 32-bit packed binary format used in low-level network functions .