📜  使用 python 代码示例休眠窗口

📅  最后修改于: 2022-03-11 14:46:43.726000             🧑  作者: 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"