📜  使用 python 代码示例关闭重新启动休眠注销窗口

📅  最后修改于: 2022-03-11 14:47:17.839000             🧑  作者: Mango

代码示例1
# This is for a windows operating system
# We will use the os library
import os

# os.system is basically running a cmd command

os.system("shutdown /s") #shutdown
os.system("shutdown /r") #restart
os.system("shutdown /l") #logoff
os.system("shutdown /h") #hibernate

#for a full list of commands, go into Command Prompt and type "shutdown"