Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import re, threading
- name = open('list.txt', 'r')
- fout = open('names.txt', 'a')
- def Parse():
- for lines in name:
- m = re.search('^Bob', lines)
- if m:
- a = m.group()
- print a
- fout.write(a+'\n')
- numOfThreads = 12
- for i in range(numOfThreads):
- t = threading.Thread(target=Parse, args=())
- t.start()
- print str(threading.activeCount())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement