On 09/16/2012 07:56 PM, Scurvy Scott wrote: > scratch that, new code is below for your perusal: > > from Crypto.PublicKey import RSA > import hashlib > > def repeat_a_lot(): > count = 0 > while count < 20:
You're kidding, aren't you? while loops are meant for those times when you don't know how many times the loop is to iterate. > m = RSA.generate(1024) > b = hashlib.sha1() > b.update(str(m)) > a = b.hexdigest() > print a[:16] + '.onion' > count += 1 > repeat_a_lot() > > > def repeat_a_lot(): for _ in xrange(20): m = RSA.generate(1024) b = hashlib.sha1() b.update(str(m)) a = b.hexdigest() print a[:16] + '.onion' repeat_a_lot() -- DaveA _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor