Home | History | Annotate | Download | only in idlelib

Lines Matching refs:section

45     def Get(self, section, option, type=None, default=None, raw=False):
47 Get an option value for given section/option or return default.
51 # Should also print Warning(file, section, option).
53 if not self.has_option(section, option):
56 return self.getboolean(section, option)
58 return self.getint(section, option)
60 return self.get(section, option, raw=raw)
62 def GetOptionList(self, section):
63 "Return a list of options for given section, else []."
64 if self.has_section(section):
65 return self.options(section)
78 def AddSection(self, section):
79 "If section doesn't exist, add it."
80 if not self.has_section(section):
81 self.add_section(section)
85 for section in self.sections():
86 if not self.GetOptionList(section):
87 self.remove_section(section)
94 def RemoveOption(self, section, option):
95 """Return True if option is removed from section, else False.
97 False if either section does not exist or did not have option.
99 if self.has_section(section):
100 return self.remove_option(section, option)
103 def SetOption(self, section, option, value):
106 Add section if required. False means option already had value.
108 if self.has_option(section, option):
109 if self.get(section, option) == value:
112 self.set(section, option, value)
115 if not self.has_section(section):
116 self.add_section(section)
117 self.set(section, option, value)
216 def GetOption(self, configType, section, option, default=None, type=None,
218 """Return a value for configType section option, or default.
230 if self.userCfg[configType].has_option(section, option):
231 return self.userCfg[configType].Get(section, option,
236 ' from section %r: %r' %
237 (type, option, section,
238 self.userCfg[configType].Get(section, option, raw=raw)))
244 if self.defaultCfg[configType].has_option(section,option):
246 section, option, type=type, raw=raw)
253 ' from section %r.\n'
255 (option, section, default))
262 def SetOption(self, configType, section, option, value):
263 """Set section option to value in user config file."""
264 self.userCfg[configType].SetOption(section, option, value)
378 idlelib.config-main.def includes this section
443 "Return extnNameList with keybinding section names removed."
451 for index in kbNameIndicies: #delete each keybinding section name
472 Events come from default config extension_cfgBindings section.
490 Events come from default config extension_cfgBindings section.
528 keySetName - name of key binding set (config-keys section).
700 def GetFont(self, root, configType, section):
711 family = self.GetOption(configType, section, 'font', default='courier')
712 size = self.GetOption(configType, section, 'font-size', type='int',
714 bold = self.GetOption(configType, section, 'font-bold', default=0,
763 for section in sections:
764 options = cfg[key].options(section)
765 sprint(section)
768 sprint(option + ' = ' + cfg[key].Get(section, option))