Changing brightness of the Macbook(Pro) keyboard backlight

前端 未结 1 941
死守一世寂寞
死守一世寂寞 2021-01-06 19:22

Programaticly, how can I modify the brightness of the backlit keyboard on a Macbook or Macbook Pro using Python?

1条回答
  •  無奈伤痛
    2021-01-06 19:35

    Amit Singh discusses these undocumented APIs in this online bonus chapter, but does so using C -- I'm not sure if a Python extension exists to do the same work from Python, perhaps as part of PyObjC (otherwise, such an extension would have to be written -- or ctypes used to access the shared C libraries directly from Python [shudder;-)]).

    0 讨论(0)
提交回复
热议问题