Win XP "Sleep" mode: can Py wake up?

B

Bell, Kevin

Does anyone have any experience having python deal with sleep mode? I'd
love to run something that would hear a sleep event coming and pickle
some data before sleep, then after coming out of sleep, unpickle...

Any thoughts?
 
T

Tim Golden

Does anyone have any experience having python deal with sleep mode? I'd
love to run something that would hear a sleep event coming and pickle
some data before sleep, then after coming out of sleep, unpickle...

It should, in theory, be possibly by trapping the WMI
Win32_PowerManagementEvent event. I haven't time
to try it out at the moment, unfortunately. Alternatively,
the WM_POWERBROADCAST message looks hopeful
if you wanted to go the Message Loop route.

TJG
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,159
Latest member
SweetCalmCBDGummies
Top