Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
app
✓ from appscript import app
✗ import appscript
app is the main entry point; importing the module directly does not give you the app function.
k
✓ from appscript import k
✗ from appscript import key as k
k is a constant for keyword parameters; it is not named 'key'.
Control the Finder to list files on the desktop.
from appscript import app, k
# Get the current Finder
finder = app('Finder')
# List files on desktop
for item in finder.desktop.files():
print(item.name())
Debug
Known issues
gotchaappscript is heavily dependent on Apple's Open Scripting Architecture (OSA). Starting with macOS 10.15 (Catalina), Apple introduced stricter sandboxing and deprecated the use of inter-process Apple Events for non-sandboxed apps. As a result, many scripts may fail or require explicit user permissions via System Preferences > Security & Privacy > Automation.fixEnsure your application is granted automation permissions in System Preferences. For headless or script use, consider using osascript or PyObjC alternative.
affects: macOS >= 10.15
gotchaappscript is not compatible with macOS Big Sur (11.0) and later on Apple Silicon (M1/M2) when running Python under Rosetta 2. Python must be native (arm64) or the library may crash or behave unpredictably.fixUse a native arm64 Python interpreter (e.g., from python.org or Homebrew). Check with 'python -c "import platform; print(platform.machine())"'.
affects: macOS >= 11.0 (Apple Silicon)
deprecatedThe appscript project is effectively in maintenance mode. The last release was in 2015, and there are known issues with modern macOS versions. No future updates are expected.fixConsider migrating to PyObjC's ScriptingBridge or using osascript via subprocess for new projects.
affects: all
Upgrade
Version history
1.4.0latest on PyPI · released Oct 8, 2025
Audit
Dependencies
No dependency data recorded yet.