[python-win32] How to find the current/last system state from Python

prashant padaganur prashantpadaganur at gmail.com
Wed Jul 4 07:01:06 CEST 2012


On 03/07/2012 12:23, prashant padaganur wrote:
>>* *>>* I want to write an application that puts the system in to different*>>* sleep states. Like S0,S1...S4.*>>* *>>* Before changing from one state to another I want to know the*>>* current/previous sleep state. *>>* *>>* For Ex: If the current state is S0 then I want to put it to S1. Or if*>>* the previous state was S3 then I want to put the system to S4.*>>* *>>* I want to know how can I get this state info from python using Win32*>>* apis. The related struct I found on MSDN is SYSTEM_POWER_STATE *>>* *>>* http://msdn.microsoft.com/en-us/library/windows/desktop/aa373227(v=vs.85).aspx*>
>Chances are that WMI can do it: try Googling for "WMI power management"
>or something similar
>
>TJG

No luck so far. If anyone has done something similar please share your thoughts.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20120704/92768fcf/attachment.html>


More information about the python-win32 mailing list