def get_config(config_file_path=None):
    """
        Parses the .gnippy file at the provided location.
        Returns a dictionary with all the possible configuration options,
        with None for the options that were not provided.
    """
    if not os.path.isfile(config_file_path):
        raise ConfigFileNotFoundException("Could not find %s" % config_file_path)

    # Attempt to parse the config file
    result = {}
    parser = ConfigParser.SafeConfigParser()
    parser.read(config_file_path)

    # These are all the configurable settings by setting
    options = {
        "Credentials": ('username', 'password'),
        "PowerTrack": ("url", )
    }

    for section in options:
        keys = options[section]
        values = {}
        for key in keys:
            try:
                values[key] = parser.get(section, key)
            except ConfigParser.NoOptionError:
                values[key] = None
            except ConfigParser.NoSectionError:
                values[key] = None

        result[section] = values

    return result
dataset/ETHPy150Open twitterdev/twitter-for-bigquery/libs/gnippy/config.py/get_config/original