class ip:
"A Ip class for finding user's area"
def __init__(self, low_ip, up_ip):
self.low_ip = low_ip
self.up_ip = up_ip
def __str__(self):
return "Low: %d; Up: %d" % (self.low_ip,self.up_ip)
def cmpare(self,ip):
if( ip>;=low_ip and ip<=up_ip ):
return 0
elif( ip<low_ip ):
return -1
else: return 1