From 827822ef3f389548ca2ac11b11c5e498f45fe78a Mon Sep 17 00:00:00 2001 From: Ronald Oussoren Date: Thu, 12 Feb 2009 15:01:44 +0000 Subject: Fix for issue5194, based on a patch by Ned Deily. --- Lib/idlelib/macosxSupport.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'Lib/idlelib/macosxSupport.py') diff --git a/Lib/idlelib/macosxSupport.py b/Lib/idlelib/macosxSupport.py index 9f92b6c9da..e759157444 100644 --- a/Lib/idlelib/macosxSupport.py +++ b/Lib/idlelib/macosxSupport.py @@ -6,8 +6,12 @@ import sys import tkinter def runningAsOSXApp(): - """ Returns True iff running from the IDLE.app bundle on OSX """ - return (sys.platform == 'darwin' and 'IDLE.app' in sys.argv[0]) + """ + Returns True if Python is running from within an app on OSX. + If so, assume that Python was built with Aqua Tcl/Tk rather than + X11 Tck/Tk. + """ + return (sys.platform == 'darwin' and '.app' in sys.executable) def addOpenEventSupport(root, flist): """ -- cgit v1.2.1