编辑脚本以使用input()函数查询用户的关机超时时间。编辑脚本以使用另一个input()函数查询用户,以获取在机器执行关机时显示的消息。我有问题使用输入功能,要求用户关闭电脑一段时间,也要求他们显示一条消息。在
import os
#chkdsk = "chkdsk C:"
#os.system(chkdsk)
print("How much time till shutdown?")
time = input()
print (time)
shutdown = 'shutdown", "-f", "-r", "-t", "-c", MESSAGE HERE'
os.system(shutdown)
你只要用那句话:
我没听错吧:你想把时间放在绳子里吗?在
相关问题 更多 >
编程相关推荐