Lines Matching refs:option
50 def Get(self, section, option, type=None, default=None, raw=False):
52 Get an option value for given section/option or return default.
56 # Should also print Warning(file, section, option).
58 if not self.has_option(section, option):
61 return self.getboolean(section, option)
63 return self.getint(section, option)
65 return self.get(section, option, raw=raw)
84 def SetOption(self, section, option, value):
85 """Return True if option is added or changed to value, else False.
87 Add section if required. False means option already had value.
89 if self.has_option(section, option):
90 if self.get(section, option) == value:
93 self.set(section, option, value)
98 self.set(section, option, value)
101 def RemoveOption(self, section, option):
102 """Return True if option is removed from section, else False.
104 False if either section does not exist or did not have option.
107 return self.remove_option(section, option)
214 def GetOption(self, configType, section, option, default=None, type=None,
216 """Return a value for configType section option, or default.
228 if self.userCfg[configType].has_option(section, option):
229 return self.userCfg[configType].Get(section, option,
233 ' invalid %r value for configuration option %r\n'
235 (type, option, section,
236 self.userCfg[configType].Get(section, option, raw=raw)))
237 _warn(warning, configType, section, option)
239 if self.defaultCfg[configType].has_option(section,option):
241 section, option, type=type, raw=raw)
247 ' problem retrieving configuration option %r\n'
250 (option, section, default))
251 _warn(warning, configType, section, option)
254 def SetOption(self, configType, section, option, value):
255 """Set section option to value in user config file."""
256 self.userCfg[configType].SetOption(section, option, value)
290 """Return {option:value} dict for elements in themeName.
440 option = "enable_editor"
442 option = "enable_shell"
443 if self.GetOption('extensions', extn,option,
691 the form (menu_item , path_to_help_file , option), or return the empty
692 list. 'option' is the sequence number of the help resource. 'option'
694 therefore the returned list must be sorted by 'option'.
705 for option in options:
706 value=cfgParser.Get('HelpFiles', option, default=';')
715 helpSources.append( (menuItem,helpPath,option) )
780 """Manage a user's proposed configuration option changes.
787 option -- name of an option within a section.
788 value -- value for the option.
791 add_option: Add option and value to changes.
792 save_option: Save option and value to config parser.
823 # If we got here, set the option.
900 for option in options:
901 sprint(option + ' = ' + cfg[key].Get(section, option))