2017-03-07 71 views
1

我想看看我能在電腦睡眠前右推出的Python程序函數或方法,一些沿Python的檢測睡眠模式windows10

def f(): 
    if about_to_sleep: 
     do_stuff 
    else: 
     do_some_other_stuff 

線,可以工作去在Windows 10中

+0

到目前爲止您有試過任何東西嗎? –

+1

[Python-Windows關閉事件]的可能重複(http://stackoverflow.com/questions/1411186/python-windows-shutdown-events) – Avantol13

回答