Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python
- import random
- import string
- import time
- char_set = string.ascii_uppercase + string.digits
- class Script(object):
- def __init__(self):
- self.stop = False
- def suspend(self):
- print 'Suspending execution...'
- self.stop = True
- def run(self):
- count = 0
- for i in xrange(600):
- num = random.randrange(10)
- times = 1
- if num % 3 == 0:
- times = 5
- for i in xrange(times):
- print count, ''.join(random.sample(char_set*6, 6))
- if not num % 5:
- time.sleep(1)
- count += 1
- if self.stop:
- break
- if __name__ == '__main__':
- s = Script()
- s.run()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement