Last active
November 12, 2022 08:04
-
-
Save SKaplanOfficial/521c7e4b4349a5ad1e0bd3a2fe206113 to your computer and use it in GitHub Desktop.
Using PyXA to reveal a System Preferences pane and prompt for authorization
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Tested with PyXA 0.1.0 | |
import PyXA | |
from time import sleep | |
app = PyXA.Application("System Preferences") | |
app.activate() | |
pane = app.panes().by_name("Date & Time") | |
pane.reveal() | |
sleep(0.5) # Wait for animation to finish | |
pane.authorize() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment