def directories(self, filters=None, containing=None):
filters = compile_masks(filters or [r'<STR_LIT>'])<EOL>contains = compile_masks(containing)<EOL>for dirname, files in iteritems(self._found):<EOL><INDENT>relpath = text_type(Path(dirname).relative_to(self.base_path))<EOL>if matches_masks(relpath, filters):<EOL><INDENT>if not contains or self._contains(files, contains):<EOL><INDENT>yield dirname<EOL><DEDENT><DEDENT><DEDENT>
A generator that produces a sequence of paths to directories in the
project that matches the specified filters.

:param filters:
    the regular expressions to use when finding directories in the
    project. If not specified, all directories are returned.
:type filters: list(str)
:param containing:
    if a directory passes through the specified filters, it is checked
    for the presence of a file that matches one of the regular
    expressions in this parameter.
:type containing: list(str)