首页 > 解决方案 > Python: Waking MacOS Device

问题描述

There is a section in my Python code that requires the MacBook to be awake. Right before that section, I want include some code that can wake my MacBook up. Can this be done, or, is it impossible to wake a Mac device inside a Python script?

def wake_macbook_up():
    need code here


def code_that_needs_macbook_to_be_awake():
    my current code


wake_macbook_up()
code_that_needs_macbook_to_be_awake()

标签: pythonmacossleepwakeup

解决方案


推荐阅读