summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib/keybindingDialog.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/idlelib/keybindingDialog.py')
-rw-r--r--Lib/idlelib/keybindingDialog.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/idlelib/keybindingDialog.py b/Lib/idlelib/keybindingDialog.py
index aff9cac..5339f88 100644
--- a/Lib/idlelib/keybindingDialog.py
+++ b/Lib/idlelib/keybindingDialog.py
@@ -3,7 +3,7 @@ Dialog for building Tkinter accelerator key bindings
"""
from Tkinter import *
import tkMessageBox
-import string, os
+import string
class GetKeysDialog(Toplevel):
def __init__(self,parent,title,action,currentKeySequences):
@@ -132,8 +132,8 @@ class GetKeysDialog(Toplevel):
order is also important: key binding equality depends on it, so
config-keys.def must use the same ordering.
"""
- import sys
- if sys.platform == 'darwin' and sys.argv[0].count('.app'):
+ from idlelib import macosxSupport
+ if macosxSupport.runningAsOSXApp():
self.modifiers = ['Shift', 'Control', 'Option', 'Command']
else:
self.modifiers = ['Control', 'Alt', 'Shift']
@@ -167,7 +167,7 @@ class GetKeysDialog(Toplevel):
def GetModifiers(self):
modList = [variable.get() for variable in self.modifier_vars]
- return filter(None, modList)
+ return [mod for mod in modList if mod]
def ClearKeySeq(self):
self.listKeysFinal.select_clear(0,END)