def config_read_prefixed_options(conf, prefix_name, defaults):
 params = {}
 for option_name in defaults.keys():
  value = conf.get(('%s%s' % (prefix_name, option_name)))
  if value:
   if isinstance(defaults.get(option_name), list):
    params[option_name] = []
    for role in value.lower().split(','):
     params[option_name].append(role.strip())
   else:
    params[option_name] = value.strip()
 return params

def config_read_prefixed_options ( conf , prefix_name , defaults ) : params = { } for option_name in defaults . keys ( ) : value = conf . get ( ( '%s%s' % ( prefix_name , option_name ) ) ) if value : if isinstance ( defaults . get ( option_name ) , list ) : params [ option_name ] = [ ] for role in value . lower ( ) . split ( ',' ) : params [ option_name ] . append ( role . strip ( ) ) else : params [ option_name ] = value . strip ( ) return params
read prefixed options from configuration .