Fix for #1905: PythonLauncher not working correctly on OSX 10.5/Leopard
This fixes both Python Launchar and the terminalcommand module.
diff --git a/Lib/plat-mac/Carbon/AppleEvents.py b/Lib/plat-mac/Carbon/AppleEvents.py
index e23c079..a4d7dcf 100644
--- a/Lib/plat-mac/Carbon/AppleEvents.py
+++ b/Lib/plat-mac/Carbon/AppleEvents.py
@@ -1,6 +1,7 @@
# Generated from 'AEDataModel.h'
def FOUR_CHAR_CODE(x): return x
+typeApplicationBundleID = FOUR_CHAR_CODE('bund')
typeBoolean = FOUR_CHAR_CODE('bool')
typeChar = FOUR_CHAR_CODE('TEXT')
typeSInt16 = FOUR_CHAR_CODE('shor')
diff --git a/Lib/plat-mac/terminalcommand.py b/Lib/plat-mac/terminalcommand.py
index 292f09c..480797b 100644
--- a/Lib/plat-mac/terminalcommand.py
+++ b/Lib/plat-mac/terminalcommand.py
@@ -27,7 +27,7 @@
def run(command):
"""Run a shell command in a new Terminal.app window."""
- termAddress = AE.AECreateDesc(typeApplSignature, TERMINAL_SIG)
+ termAddress = AE.AECreateDesc(typeApplicationBundleID, "com.apple.Terminal")
theEvent = AE.AECreateAppleEvent(kAECoreSuite, kAEDoScript, termAddress,
kAutoGenerateReturnID, kAnyTransactionID)
commandDesc = AE.AECreateDesc(typeChar, command)