summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib/macosxSupport.py
diff options
context:
space:
mode:
authorRonald Oussoren <ronaldoussoren@mac.com>2009-02-12 15:01:44 (GMT)
committerRonald Oussoren <ronaldoussoren@mac.com>2009-02-12 15:01:44 (GMT)
commit827822ef3f389548ca2ac11b11c5e498f45fe78a (patch)
tree94532be2aa8126ef966cff4f1f7c0d7d35871b37 /Lib/idlelib/macosxSupport.py
parentde09acf2984b6699aa7a45c2ea2429c6da5f046e (diff)
downloadcpython-827822ef3f389548ca2ac11b11c5e498f45fe78a.zip
cpython-827822ef3f389548ca2ac11b11c5e498f45fe78a.tar.gz
cpython-827822ef3f389548ca2ac11b11c5e498f45fe78a.tar.bz2
Fix for issue5194, based on a patch by Ned Deily.
Diffstat (limited to 'Lib/idlelib/macosxSupport.py')
-rw-r--r--Lib/idlelib/macosxSupport.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/Lib/idlelib/macosxSupport.py b/Lib/idlelib/macosxSupport.py
index 9f92b6c..e759157 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):
"""