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

Chris Mellon arkanes at gmail.com
Fri Jan 26 10:48:35 EST 2007


On 1/26/07, Bell, Kevin <kevin.bell at slcgov.com> wrote:
> 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?
>

The whole point of sleep mode is that the OS "pickles" it's state and
that of all processes, then restores them when it wakes up. The only
reason you, as an application, would need to do anything is if you're
consuming an external resource that can't survive sleep, like a
network connection. Even then, if your application is robust against
(non-sleep) network problems and outages you should be able to just
pick up where you left off when the network comes back online.



More information about the Python-list mailing list