(path, dir_filter=None)
return dirs
Return the list of all directories under the given path in
        topdown order.

        Args:
            dir_filter: if not None, the filter will be invoked
                with the filesystem object and the path of each dirfound.
                The dir is included in the result if the callback returns True.
Return the list of all directories under the given path in
        topdown order.
Return the list of all directories under the given path in topdown order .
def dirs_under(path, dir_filter=None):
        """Return the list of all directories under the given path in
        topdown order.

        Args:
            dir_filter: if not None, the filter will be invoked
                with the filesystem object and the path of each dirfound.
                The dir is included in the result if the callback returns True.
        """
        def filter_all(dirpath):
            return True
        dir_filter = dir_filter or filter_all

        dirs = []
        for (dirpath, dirnames, filenames) in os.walk(path):
            if dir_filter(dirpath):
                dirs.append(dirpath)
        return dirs
def dirs_under ( path , dir_filter = None ) : def filter_all ( dirpath ) : return True dir_filter = dir_filter or filter_all dirs = [ ] for ( dirpath , dirnames , filenames ) in os . walk ( path ) : if dir_filter ( dirpath ) : dirs . append ( dirpath ) return dirs