diff options
author | Ronald Oussoren <ronaldoussoren@mac.com> | 2009-03-04 21:35:05 (GMT) |
---|---|---|
committer | Ronald Oussoren <ronaldoussoren@mac.com> | 2009-03-04 21:35:05 (GMT) |
commit | a97063a1086266e774586765b3c3e65ed2a4a1eb (patch) | |
tree | 7f16fd30f492457d5fbb0e3484c6f732743c6413 /Lib/idlelib/macosxSupport.py | |
parent | cea1ddb4aa6ccae552ff9838cb07c6802785b8fc (diff) | |
download | cpython-a97063a1086266e774586765b3c3e65ed2a4a1eb.zip cpython-a97063a1086266e774586765b3c3e65ed2a4a1eb.tar.gz cpython-a97063a1086266e774586765b3c3e65ed2a4a1eb.tar.bz2 |
Fixes issues 3883 and 5194
Diffstat (limited to 'Lib/idlelib/macosxSupport.py')
-rw-r--r-- | Lib/idlelib/macosxSupport.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Lib/idlelib/macosxSupport.py b/Lib/idlelib/macosxSupport.py index 279b1cc..98b35b6 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): """ |