def celebrate(): global red_score global blue_score red_score = 0 blue_score = 0 # turn on spotlight rf.on(3) # sleep time in seconds time.sleep(60) # turn off spotlight rf.off(3)
def translate_path(self, path): print "path: " + path if path == "/laugh": audio.play_laugh() elif path == "/nick-on": rf.on(4) elif path == "/nick-off": rf.off(4) elif path == "/dave-on": rf.on(3) elif path == "/dave-off": rf.off(3) elif path == "/living-room-on": rf.on(2) elif path == "/living-room-off": rf.off(2) elif path == "/applause": audio.play_applause() else: print "Unkown command: " + path # default root -> cwd #root = os.getcwd() #print root # TODO: if path starts with client do this at the top, else return empty 200. # return unchanged path to get any appropriate files. return path[1:]