def bind_module_config(mod, conf_data, config_key):
 if hasattr(mod, 'CONFIGURATION_SECTION'):
  section = mod.CONFIGURATION_SECTION
 elif mod.__name__.endswith('.conf'):
  section = mod.__name__[:(- len('.conf'))]
 else:
  section = mod.__name__
 if (config_key is None):
  bind_data = conf_data.get(section, {})
 else:
  section = config_key
  bind_data = conf_data.get(config_key, {})
 members = _bind_module_members(mod, bind_data, section)
 return ConfigSection(section, members=members, help=mod.__doc__)

def bind_module_config ( mod , conf_data , config_key ) : if hasattr ( mod , 'CONFIGURATION_SECTION' ) : section = mod . CONFIGURATION_SECTION elif mod . __name__ . endswith ( '.conf' ) : section = mod . __name__ [ : ( - len ( '.conf' ) ) ] else : section = mod . __name__ if ( config_key is None ) : bind_data = conf_data . get ( section , { } ) else : section = config_key bind_data = conf_data . get ( config_key , { } ) members = _bind_module_members ( mod , bind_data , section ) return ConfigSection ( section , members = members , help = mod . __doc__ )
binds the configuration for the module to the given data .