I'm coding a small Python script, that checks the records of a few domains. This is how I do it:
if results.short == True:
        isonlist = False
        for dnsbls in L:
                try:
                        if  socket.gethostbyname("%s.%s" % (ip_reversed(results.IP), dnsbls)).startswith("127"):
                                isonlist = True
                except (socket.gaierror):
                        pass
        if isonlist == True:
                print "1"
        else:
                print "0"
else:
        pass
Right now it outputs 1 if it get's a valid record and 0 if it doesn't.
Now, I'd like for it to show a progress bar, like when you use wget and the likes. Tried doing it like this:
number = number + 1
But that yields me 1 2 3 4 and so forth.
 
     
     
     
     
    