Merged revisions 70176 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r70176 | ronald.oussoren | 2009-03-04 22:35:05 +0100 (Wed, 04 Mar 2009) | 2 lines
Fixes issues 3883 and 5194
........
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 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):
"""