diff options
Diffstat (limited to 'Lib/idlelib/macosxSupport.py')
-rw-r--r-- | Lib/idlelib/macosxSupport.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Lib/idlelib/macosxSupport.py b/Lib/idlelib/macosxSupport.py index d2705300d7..346f04d1a3 100644 --- a/Lib/idlelib/macosxSupport.py +++ b/Lib/idlelib/macosxSupport.py @@ -5,13 +5,19 @@ GUI application (as opposed to an X11 application). import sys import tkinter + +_appbundle = None + def runningAsOSXApp(): """ 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 Tcl/Tk. """ - return (sys.platform == 'darwin' and '.app' in sys.executable) + global _appbundle + if _appbundle is None: + _appbundle = (sys.platform == 'darwin' and '.app' in sys.executable) + return _appbundle def addOpenEventSupport(root, flist): """ |