Skip to content

Instantly share code, notes, and snippets.

@SKaplanOfficial
Last active November 12, 2022 08:04
Show Gist options
  • Save SKaplanOfficial/521c7e4b4349a5ad1e0bd3a2fe206113 to your computer and use it in GitHub Desktop.
Save SKaplanOfficial/521c7e4b4349a5ad1e0bd3a2fe206113 to your computer and use it in GitHub Desktop.
Using PyXA to reveal a System Preferences pane and prompt for authorization
# 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