This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ned.deily
Recipients AegisEmerald545, Auerhahn, TotallyLost, miss-islington, ned.deily, nicholasjbond2020, ronaldoussoren
Date 2022-01-03.06:52:54
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1641192774.98.0.442564722031.issue40477@roundup.psfhosted.org>
In-reply-to
Content
Thanks, Ronald, for tracking down the NSAppleEventsUsageDescription requirement!

The PR here solves two problems encountered by users of the macOS Python Launcher app on recent macOS releases (10.14+):

1. The launcher app was no longer able to launch the macOS Terminal.app to run a script.

2. Even if Terminal.app was already launched, the launcher app was unable to send an Apple Event to Terminal.app to open and run Python with the desired .py file.

The solution to item 1 was to no longer specify an absolute path to Terminal.app but rather let LaunchServices figure out the path.

Item 2 was fixed by adding the NSAppleEventsUsageDescription key to the launcher app's property list. The first time the launcher runs, macOS displays a message to the user requesting permission to use Apple events; if granted by the user, the launcher will now be able to send open events to Terminal.app and all is well.

Tested on the most recent releases of macOS 12, 11, 10.16, 10.15, 10.14, and 10.9 and on both Intel and Apple Silicon Macs.

Merged for release in 3.9.10, 3.10.2, and 3.11.0a4.
History
Date User Action Args
2022-01-03 06:52:55ned.deilysetrecipients: + ned.deily, ronaldoussoren, miss-islington, Auerhahn, TotallyLost, nicholasjbond2020, AegisEmerald545
2022-01-03 06:52:54ned.deilysetmessageid: <1641192774.98.0.442564722031.issue40477@roundup.psfhosted.org>
2022-01-03 06:52:54ned.deilylinkissue40477 messages
2022-01-03 06:52:54ned.deilycreate