arte/utils/help.py
def help(self, search='', prefix=''):
        '''
        Interactive help

        Prints on stdout a list of methods that match the *search* substring
        or all of them if *search* is left to the default value of an empty
        string, together with a one-line help taken from the first line
        of their docstring, if any.

        The *prefix* argument is prepended to the method name and is used
        for recursive help of every class member.
        '''
        methods = {k: getattr(self, k) for k in dir(self) if callable(getattr(self, k))}
        members = {k: getattr(self, k) for k in dir(self) if not callable(getattr(self, k))}

        properties = ({k: getattr(self.__class__, k)
                      for k in dir(self.__class__)
                      if isinstance(getattr(self.__class__, k), property)})

        methods.update(properties)

        methods = {k: v for k, v in methods.items() if _is_public_method(k) \
                                                      and not _is_hidden(v)}
        members = {k: v for k, v in members.items() if _is_hlp_class(v)}

        if prefix == '':
            prefix = self.__class__.__name__

        hlp = {prefix: _format_docstring(self)}

        for name, method in methods.items():
            name = _format_name(method, default=name)
            pars = _format_pars(method)
            helpstr = _format_docstring(method)

            hlp[prefix + '.' + name + pars] = helpstr

        maxlen = max(map(len, hlp.keys()))
        fmt = '%%-%ds%%s' % (maxlen + 3)

        lines = []
        for k in sorted(hlp.keys()):
            line = fmt % (k, hlp[k])
            if search in line:
                lines.append(line)

        if len(lines) > 0:
            print('---------')
            for line in lines:
                print(line)

        for name, obj in sorted(members.items()):
            obj.help(search=search, prefix='%s.%s' % (prefix, name))

        Interactive help

        Prints on stdout a list of methods that match the *search* substring
        or all of them if *search* is left to the default value of an empty
        string, together with a one-line help taken from the first line
        of their docstring, if any.

        The *prefix* argument is prepended to the method name and is used
        for recursive help of every class member.
        
Interactive help
Prints on stdout a list of methods that match the *search* substring
or all of them if *search* is left to the default value of an empty
string, together with a one-line help taken from the first line
of their docstring, if any.

The *prefix* argument is prepended to the method name and is used
for recursive help of every class member.
Interactive help Prints on stdout a list of methods that match the * search * substring or all of them if * search * is left to the default value of an empty string together with a one - line help taken from the first line of their docstring if any . The * prefix * argument is prepended to the method name and is used for recursive help of every class member .
def help(self, search='', prefix=''):
        methods = {k: getattr(self, k) for k in dir(self) if callable(getattr(self, k))}
        members = {k: getattr(self, k) for k in dir(self) if not callable(getattr(self, k))}
        properties = ({k: getattr(self.__class__, k)
                      for k in dir(self.__class__)
                      if isinstance(getattr(self.__class__, k), property)})
        methods.update(properties)
        methods = {k: v for k, v in methods.items() if _is_public_method(k) \
                                                      and not _is_hidden(v)}
        members = {k: v for k, v in members.items() if _is_hlp_class(v)}
        if prefix == '':
            prefix = self.__class__.__name__
        hlp = {prefix: _format_docstring(self)}
        for name, method in methods.items():
            name = _format_name(method, default=name)
            pars = _format_pars(method)
            helpstr = _format_docstring(method)
            hlp[prefix + '.' + name + pars] = helpstr
        maxlen = max(map(len, hlp.keys()))
        fmt = '%%-%ds%%s' % (maxlen + 3)
        lines = []
        for k in sorted(hlp.keys()):
            line = fmt % (k, hlp[k])
            if search in line:
                lines.append(line)
        if len(lines) > 0:
            print('---------')
            for line in lines:
                print(line)
        for name, obj in sorted(members.items()):
            obj.help(search=search, prefix='%s.%s' % (prefix, name))
def help ( self , search = '' , prefix = '' ) : methods = { k : getattr ( self , k ) for k in dir ( self ) if callable ( getattr ( self , k ) ) } members = { k : getattr ( self , k ) for k in dir ( self ) if not callable ( getattr ( self , k ) ) } properties = ( { k : getattr ( self . __class__ , k ) for k in dir ( self . __class__ ) if isinstance ( getattr ( self . __class__ , k ) , property ) } ) methods . update ( properties ) methods = { k : v for k , v in methods . items ( ) if _is_public_method ( k ) and not _is_hidden ( v ) } members = { k : v for k , v in members . items ( ) if _is_hlp_class ( v ) } if prefix == '' : prefix = self . __class__ . __name__ hlp = { prefix : _format_docstring ( self ) } for name , method in methods . items ( ) : name = _format_name ( method , default = name ) pars = _format_pars ( method ) helpstr = _format_docstring ( method ) hlp [ prefix + '.' + name + pars ] = helpstr maxlen = max ( map ( len , hlp . keys ( ) ) ) fmt = '%%-%ds%%s' % ( maxlen + 3 ) lines = [ ] for k in sorted ( hlp . keys ( ) ) : line = fmt % ( k , hlp [ k ] ) if search in line : lines . append ( line ) if len ( lines ) > 0 : print ( '---------' ) for line in lines : print ( line ) for name , obj in sorted ( members . items ( ) ) : obj . help ( search = search , prefix = '%s.%s' % ( prefix , name ) )
Interactive help
Prints on stdout a list of methods that match the *search* substring
or all of them if *search* is left to the default value of an empty
string, together with a one-line help taken from the first line
of their docstring, if any.
Interactive help Prints on stdout a list of methods that match the * search * substring or all of them if * search * is left to the default value of an empty string together with a one - line help taken from the first line of their docstring if any .
'''
        Interactive help

        Prints on stdout a list of methods that match the *search* substring
        or all of them if *search* is left to the default value of an empty
        string, together with a one-line help taken from the first line
        of their docstring, if any.

        The *prefix* argument is prepended to the method name and is used
        for recursive help of every class member.
        '''
self
search
prefix