代码:
import os,time,sys
o="c:windowssystem32shutdown -s"
print "Input the hours and minutes:"
h=input()
mt=input()
t=time.localtime()
y,m,d,h1,mt1=t[:5]
if(h<h1):
print "The time has been pass"
elif(h==h1 and mt<mt1):
print "The time has been pass"
hm=(y,m,d,h,mt)
while 1:
t= time.localtime(time.time())
a=t[:5]
if(a==hm):
print "Time is coming"
os.system(o)
break
time.sleep(31)