@classmethod
    def class_config_section(cls):
        """Get the config class config section"""
        def c(s):
            """return a commented, wrapped block."""
            s = '\n\n'.join(wrap_paragraphs(s, 78))
            
            return '# ' + s.replace('\n', '\n# ')
        
        # section header
        breaker = '#' + '-'*78
        s = "# %s configuration"%cls.__name__
        lines = [breaker, s, breaker, '']
        # get the description trait
        desc = cls.class_traits().get('description')
        if desc:
            desc = desc.default_value
        else:
            # no description trait, use __doc__
            desc = getattr(cls, '__doc__', '')
        if desc:
            lines.append(c(desc))
            lines.append('')
        
        parents = []
        for parent in cls.mro():
            # only include parents that are not base classes
            # and are not the class itself
            if issubclass(parent, Configurable) and \
                    not parent in (Configurable, SingletonConfigurable, cls):
                parents.append(parent)
        
        if parents:
            pstr = ', '.join([ p.__name__ for p in parents ])
            lines.append(c('%s will inherit config from: %s'%(cls.__name__, pstr)))
            lines.append('')
        
        for name,trait in cls.class_traits(config=True).items():
            help = trait.get_metadata('help') or ''
            lines.append(c(help))
            lines.append('# c.%s.%s = %r'%(cls.__name__, name, trait.get_default_value()))
            lines.append('')
        return '\n'.join(lines)
dataset/ETHPy150Open ipython/ipython-py3k/IPython/config/configurable.py/Configurable.class_config_section/original