# Path: radarpost/plugins.py
# ENTRY_POINT = 'radarpost_plugins'
# def get(slot):
# def _get(slot):
# def register(thing, slot):
# def plugin(slot):
#     def dd(thing):
# def _search():


from ConfigParser import SafeConfigParser
from radarpost import plugins

#
# Config INI parser
#
# This plugin id is used to register configuration validators / manipulators
# that can check and parse the types of configuration values read from 
# the configuration ini file.
# 
# the parser should accept a dict and raise an exception
# if any illegal configuration is found.  The parser is 
# free to manipulate the configuration as needed.
#
# @plugins.plugin(CONFIG_INI_READER_PLUGIN)
# def http_port_conf(config):
#    if 'http.port' in config: 
#       config['http.port'] = int(config['http.port'])
#
CONFIG_INI_PARSER_PLUGIN = 'radarpost.config.configiniparser'

#
# provide defaults that are used to fill in templated values in 
# configuration like %(whatever) etc. 
#
# should be a function that accepts no arguments and returns a 
# dictionary of default values.
#
CONFIG_INI_DEFAULTS_PLUGIN = 'radapost.config.configdefaults'

def load_config(*filenames):
    defaults = {}

# Path: radarpost/plugins.py
# ENTRY_POINT = 'radarpost_plugins'
# def get(slot):
# def _get(slot):
# def register(thing, slot):
# def plugin(slot):
#     def dd(thing):
# def _search():


# Path: radarpost/config.py
from ConfigParser import SafeConfigParser
from radarpost import plugins


#
# Config INI parser
#
# This plugin id is used to register configuration validators / manipulators
# that can check and parse the types of configuration values read from 
# the configuration ini file.
# 
# the parser should accept a dict and raise an exception
# if any illegal configuration is found.  The parser is 
# free to manipulate the configuration as needed.
#
# @plugins.plugin(CONFIG_INI_READER_PLUGIN)
# def http_port_conf(config):
#    if 'http.port' in config: 
#       config['http.port'] = int(config['http.port'])
#
CONFIG_INI_PARSER_PLUGIN = 'radarpost.config.configiniparser'

#
# provide defaults that are used to fill in templated values in 
# configuration like %(whatever) etc. 
#
# should be a function that accepts no arguments and returns a 
# dictionary of default values.
#
CONFIG_INI_DEFAULTS_PLUGIN = 'radapost.config.configdefaults'

def load_config(*filenames):
    defaults = {}

    for get_defaults in plugins.get(CONFIG_INI_DEFAULTS_PLUGIN):