summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib/configHandler.py
diff options
context:
space:
mode:
authorKurt B. Kaiser <kbk@shore.net>2007-08-23 05:25:55 (GMT)
committerKurt B. Kaiser <kbk@shore.net>2007-08-23 05:25:55 (GMT)
commite07127793958bc355dd34b79c08397c698c298d7 (patch)
tree72c12623b301055c9b2c0593c19fd326933c11d4 /Lib/idlelib/configHandler.py
parent460add45008adff34b3b6a75805b8acf87a6192b (diff)
downloadcpython-e07127793958bc355dd34b79c08397c698c298d7.zip
cpython-e07127793958bc355dd34b79c08397c698c298d7.tar.gz
cpython-e07127793958bc355dd34b79c08397c698c298d7.tar.bz2
Conform to py3k dict.{keys, items, values} with some advice from 2b3
M idlelib/configHandler.py M idlelib/ColorDelegator.py M idlelib/Delegator.py M idlelib/ObjectBrowser.py M idlelib/PyShell.py M idlelib/Debugger.py M idlelib/configDialog.py M idlelib/StackViewer.py M idlelib/keybindingDialog.py M idlelib/tabpage.py M idlelib/EditorWindow.py M idlelib/WindowList.py M idlelib/RemoteDebugger.py M idlelib/dynOptionMenuWidget.py
Diffstat (limited to 'Lib/idlelib/configHandler.py')
-rw-r--r--Lib/idlelib/configHandler.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/Lib/idlelib/configHandler.py b/Lib/idlelib/configHandler.py
index 0c88396..b5d9769 100644
--- a/Lib/idlelib/configHandler.py
+++ b/Lib/idlelib/configHandler.py
@@ -343,7 +343,7 @@ class IdleConf:
'stderr-background':'#ffffff',
'console-foreground':'#000000',
'console-background':'#ffffff' }
- for element in theme.keys():
+ for element in theme:
if not cfgParser.has_option(themeName,element):
#we are going to return a default, print warning
warning=('\n Warning: configHandler.py - IdleConf.GetThemeDict'
@@ -424,7 +424,7 @@ class IdleConf:
extName=None
vEvent='<<'+virtualEvent+'>>'
for extn in self.GetExtensions(active_only=0):
- for event in self.GetExtensionKeys(extn).keys():
+ for event in self.GetExtensionKeys(extn):
if event == vEvent:
extName=extn
return extName
@@ -519,7 +519,7 @@ class IdleConf:
for extn in activeExtns:
extKeys=self.__GetRawExtensionKeys(extn)
if extKeys: #the extension defines keybindings
- for event in extKeys.keys():
+ for event in extKeys:
if extKeys[event] in keySet.values():
#the binding is already in use
extKeys[event]='' #disable this binding
@@ -532,7 +532,7 @@ class IdleConf:
virtualEvent - string, name of the virtual event to test for, without
the enclosing '<< >>'
"""
- return ('<<'+virtualEvent+'>>') in self.GetCoreKeys().keys()
+ return ('<<'+virtualEvent+'>>') in self.GetCoreKeys()
def GetCoreKeys(self, keySetName=None):
"""
@@ -595,7 +595,7 @@ class IdleConf:
'<<del-word-right>>': ['<Control-Key-Delete>']
}
if keySetName:
- for event in keyBindings.keys():
+ for event in keyBindings:
binding=self.GetKeyBinding(keySetName,event)
if binding:
keyBindings[event]=binding
@@ -662,7 +662,7 @@ class IdleConf:
"""
load all configuration files.
"""
- for key in self.defaultCfg.keys():
+ for key in self.defaultCfg:
self.defaultCfg[key].Load()
self.userCfg[key].Load() #same keys
@@ -670,7 +670,7 @@ class IdleConf:
"""
write all loaded user configuration files back to disk
"""
- for key in self.userCfg.keys():
+ for key in self.userCfg:
self.userCfg[key].Save()
idleConf=IdleConf()
@@ -679,7 +679,7 @@ idleConf=IdleConf()
if __name__ == '__main__':
def dumpCfg(cfg):
print('\n',cfg,'\n')
- for key in cfg.keys():
+ for key in cfg:
sections=cfg[key].sections()
print(key)
print(sections)