Fixes issues 3883 and 5194
diff --git a/Lib/idlelib/Bindings.py b/Lib/idlelib/Bindings.py
index a3c9fc4..1853ff9 100644
--- a/Lib/idlelib/Bindings.py
+++ b/Lib/idlelib/Bindings.py
@@ -10,6 +10,7 @@
"""
import sys
from configHandler import idleConf
+import macosxSupport
menudefs = [
# underscore prefixes character to underscore
@@ -80,8 +81,7 @@
]),
]
-import sys
-if sys.platform == 'darwin' and '.app' in sys.executable:
+if macosxSupport.runningAsOSXApp():
# Running as a proper MacOS application bundle. This block restructures
# the menus a little to make them conform better to the HIG.