code: def get_default(parser, section, option, default):
      
      try:
          result = parser.get(section, option)
      except (ConfigParser.NoSectionError, ConfigParser.NoOptionError):
          result = default
      return result
docs: helper to get config settings with a default if not present