'Get an option value for given config type and given general
configuration section/option or return a default. If type is specified,
return as type. Firstly the user configuration is checked, with a
fallback to the default configuration, and a final \'catch all\'
fallback to a useable passed-in default if the option isn\'t present in
either the user or the default configuration.
configType must be one of (\'main\',\'extensions\',\'highlight\',\'keys\')
If a default is returned, and warn_on_default is True, a warning is
printed to stderr.'

def GetOption(self, configType, section, option, default=None, type=None, warn_on_default=True, raw=False):

    try:
        if self.userCfg[configType].has_option(section, option):
            return self.userCfg[configType].Get(section, option, type=type, raw=raw)
    except ValueError:
        warning = ('\n    Warning:    configHandler.py    -    IdleConf.GetOption    -\n    invalid    %r    value    for    configuration    option    %r\n    from    section    %r:    %r\n' % (type, option, section, self.userCfg[configType].Get(section, option, raw=raw)))
        try:
            sys.stderr.write(warning)
        except IOError:
            pass
    try:
        if self.defaultCfg[configType].has_option(section, option):
            return self.defaultCfg[configType].Get(section, option, type=type, raw=raw)
    except ValueError:
        pass
    if warn_on_default:
        warning = ('\n    Warning:    configHandler.py    -    IdleConf.GetOption    -\n    problem    retrieving    configuration    option    %r\n    from    section    %r.\n    returning    default    value:    %r\n' % (option, section, default))
        try:
            sys.stderr.write(warning)
        except IOError:
            pass
    return default
