Q:

OS Reboot, Shutdown, Hibernate, Sleep, Wakeup (Windows Python)

I'm looking for an automatize way of doing Windows Power Management functions:
- Reboot
- Shutdown
- Hibernate
- Sleep
- Wakeup
Is there a Python module to cover this functionality?
Of course any other solutions are also appreciated...

A:

I also went with the command line:
import os
os.system(r'%windir%\system32\rundll32.exe powrprof.dll,SetSuspendState Hibernate')

