def numToDottedQuad(num):
 import socket, struct
 if ((num > long(4294967295)) or (num < 0)):
  raise ValueError(('Not a good numeric IP: %s' % num))
 try:
  return socket.inet_ntoa(struct.pack('!L', long(num)))
 except (socket.error, struct.error, OverflowError):
  raise ValueError(('Not a good numeric IP: %s' % num))

def numToDottedQuad ( num ) : import socket , struct if ( ( num > long ( 4294967295 ) ) or ( num < 0 ) ) : raise ValueError ( ( 'Not a good numeric IP: %s' % num ) ) try : return socket . inet_ntoa ( struct . pack ( '!L' , long ( num ) ) ) except ( socket . error , struct . error , OverflowError ) : raise ValueError ( ( 'Not a good numeric IP: %s' % num ) )
convert int or long int to dotted quad string .