1# This is for a windows operating system
2# We will use the os library
3import os
4
5# os.system is basically running a cmd command
6
7os.system("shutdown /s") #shutdown
8os.system("shutdown /r") #restart
9os.system("shutdown /l") #logoff
10os.system("shutdown /h") #hibernate
11
12#for a full list of commands, go into Command Prompt and type "shutdown"