Suspend / Hibernate pc with python

后端 未结 7 1418
庸人自扰
庸人自扰 2021-01-19 02:01

I\'d like to write a short python script that puts my computer to sleep. I\'Ve already searched the API but the only result on suspend has to do with delayed execution. What

相关标签:
7条回答
  • 2021-01-19 02:58
    import os
    os.system(r'rundll32.exe powrprof.dll,SetSuspendState Hibernate')
    
    0 讨论(0)
提交回复
热议问题