0
Q:

shutdown/restart/hibernate/logoff windows with python

import os

os.system("shutdown /s") #shutdown
#or
os.system("shutdown /r") #restart
#maybe
os.system("shutdown /l") #logoff
#or maybe...
os.system("shutdown /h") #hibernate
#for a full list, go into Command Prompt and type "shutdown"
1

New to Communities?

Join the community