I am trying to programmatically enable/disable low power mode using objc_util. I found an example on Stack Exchange (https://apple.stackexchange.com/a/244040/294117) which uses a private objective c api to do this. I am unfamiliar with objective c, so I am having trouble translating the part of the code block I need into Pythonista. Do I need to import a header file? I tried importing the class using the following (this was as far as I could get):
from objc_util import *
cdbatterysaver = ObjCClass('_CDBatterySaver')
I don’t know which method or property I need to use or change. Is there a way to generate a list of this in Pythonista?
How would the Stack Exchange code translate to Pythonista? Thanks in advance!