def print_callback(ttl, payload): if payload: curr_host = "%(hostname)s (%(ip)s)" % payload print "%d\t%s" % (ttl, curr_host) print "\t", print georesolve.lookup(**payload) else: print "%d\t*" % ttl
def trace_callback(self, ttl, payload): payload_p = "%(hostname)s (%(ip)s)" % payload if payload else '*' print "%s\t%s" % (ttl, payload_p) self.tb.insert_at_cursor("%s\t%s\n" % (ttl, payload_p)) if payload: res = georesolve.lookup(**payload) if georesolve.ACCURACY[res['accuracy']] > georesolve.ACCURACY['none']: print "\t", print res lat = res['lat'] lng = res['lng'] self.osm.gps_add(lat, lng, heading=osmgpsmap.INVALID);
def trace_callback(self, ttl, payload): payload_p = "%(hostname)s (%(ip)s)" % payload if payload else '*' print "%s\t%s" % (ttl, payload_p) self.tb.insert_at_cursor("%s\t%s\n" % (ttl, payload_p)) if payload: res = georesolve.lookup(**payload) if georesolve.ACCURACY[ res['accuracy']] > georesolve.ACCURACY['none']: print "\t", print res lat = res['lat'] lng = res['lng'] self.osm.gps_add(lat, lng, heading=osmgpsmap.INVALID)