Ok so the only solution for me is to map a sleep key which will call my
program and plan some tasks (threading.Timer), and my program will force my
system to sleep after that.

Thank you Adam for your answer !

On 30 January 2011 14:49, Adam Morris <amor...@mistermorris.com> wrote:

> Hi there,
>
> > I can force my system to sleep, but what I would like is to know when my
> > system is going to sleep, to launch some routines behind (like
> programming
> > an alarm to ring after 6 hours).
>
> I'm pretty sure not.
>
> Applescript doesn't let you register callbacks within the system, and
> even if you did something with a poll (endless repeat loop), the
> repeat loop itself would prevent it from sleeping in the first place.
>
_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG

Reply via email to