1
我的脚本的目标是从关机前获取用户输入的时间以及关机过程中想要显示的消息。我的问题是我无法弄清楚如何将变量放入shutdown命令并让它正确执行。在关机命令中使用变量
import os
time = (input("How much time till shutdown?"))
message = input("What is your shutdown message?")
shutdown = "shutdown /f /r /t", time "c", message
os.system(shutdown)
是代码? – 2016-12-01 02:04:59
是的,那是代码。 – BrewCrew15