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