1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
#! python3 # Chapter 15 Project Simple Countdown Program import time import subprocess timeLeft = 60 while timeLeft > 0: print(timeLeft) time.sleep(1) timeLeft = timeLeft -1 subprocess.Popen(['start', 'c:\\GbV\\Hit.mp3'], shell=True)