def main(): setBoard(0) try: ttyLinux.setSpecial() playGame() finally: ttyLinux.setNormal()
def test() : ttyLinux.setSpecial() for i in range(10) : time.sleep(1) keys = ttyLinux.readLookAhead() print "Got", [keys] ttyLinux.setNormal()
def test(): try: ttyLinux.setSpecial() loop() finally: ttyLinux.setNormal()
elif(uI=="p" and mode=="Paused"): mode="Running"; wirq.unpause() if(int(time.strftime("%S")) != last_time and mode!="Paused"): last_time = int(time.strftime("%S")) timer+=1 printDisplay() if(mode=="Running"): #pass cue info to current song_dir = cue_dir song_length = cue_length; timer = 0 #generate new cue song_count += 1 cue_dir = cueSong() wirq.queue(pygame.mixer.Sound(cue_dir)) cue_length = wirq.get_queue().get_length() printLog() wirq.stop() logFile.write("Program Stopped at "+time.strftime("%I:%M%p")+"\n") logFile.close() mainProgram() print("\nClosing Program") ttyLinux.setNormal()