Skip to content

Instantly share code, notes, and snippets.

@minid33
Created January 22, 2015 10:10
Show Gist options
  • Save minid33/7b9355b04db0a2e75c9a to your computer and use it in GitHub Desktop.
Save minid33/7b9355b04db0a2e75c9a to your computer and use it in GitHub Desktop.
Python Mob Programming Selector
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