Created
January 22, 2015 10:10
-
-
Save minid33/7b9355b04db0a2e75c9a to your computer and use it in GitHub Desktop.
Python Mob Programming Selector
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
import time | |
import subprocess | |
import shlex | |
names = ['Author A', 'Author B', 'Author C', 'Author D', ] | |
voices = ['Good', 'Bad', 'Cello', 'Pipe Organ'] | |
timer = 60 * 15 | |
while True: | |
name = random.choice(names) | |
try: | |
print name | |
chunks = shlex.split('say -v {} {}'.format(random.choice(voices), (name+' ')*3)) | |
subprocess.call(chunks) | |
time.sleep(timer) | |
except KeyboardInterrupt: | |
continue |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment