win32api.GetSystemPowerStatus

dict = GetSystemPowerStatus()

Retrieves the power status of the system

Comments

Requires Winxp or later.

Win32 API References

Search for GetSystemPowerStatus at msdn, google or google groups.

Return Value

Returns a dict representing a SYSTEM_POWER_STATUS struct