import ctypes
ctypes.windll.kernel32.SetThreadExecutionState(0x80000002)
ctypes.windll.kernel32.SetThreadExecutionState(0x80000000)