"prashant padaganur" <prashantpadaga...@gmail.com> wrote in message news:CAFypNu8RuhnRAQXWu5GtFZkuje1Dj-=cnrun7an+uuhjvdo...@mail.gmail.com... >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 > Any help would be greatly appreciated!!!! > -- > Br, > Prashant G.P >
You can probably get the last sleep state by scanning the event log for power events. Roger _______________________________________________ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32