When I taught myself the subprocess module, however, think that understand the syntax and parameters, and after the operation, enter the alarm clock rang point in time, to something is about to witness the miracle,,, but it pop up the window, but there was no music sounded, and I find the reason, for a long time, tried all sorts of possibilities, still not ring,,,
I the ability to solve the problem of scale may be here now, want to see my post great god please draw out a sword, appreciate
Attached code and run window
The import sys
The import time
The import subprocess
Set_time=input (" please you set the alarm clock time (for example: 8:00) : ")
Print (" the current time is: ")
Def clock () :
Start=True
While the start:
Local_time=time. Localtime ()
Now=time. Strftime (" M H % : % : % S ", local_time)
Print (now + "" r ", "end=" ", flush=True)
If now [5]==set_time. Rjust (5, "0") :
Print (" time to get up!!!!!!!!!!!!!!!
")Subprocess. Popen (" start ", "C: \ \ Users \ \ Administrator \ \ Desktop \ \ test \ Christine fan - the initial dream. Mp3"], shell=True)
Start=False
Clock ()