def _iterProjects(self, baseDirectory):
        """
        Iterate through the Twisted projects in C{baseDirectory}, yielding
        everything we need to know to build news for them.

        Yields C{topfiles}, C{news}, C{name}, C{version} for each sub-project
        in reverse-alphabetical order. C{topfile} is the L{FilePath} for the
        topfiles directory, C{news} is the L{FilePath} for the NEWS file,
        C{name} is the nice name of the project (as should appear in the NEWS
        file), C{version} is the current version string for that project.

        @param baseDirectory: A L{FilePath} representing the root directory
            beneath which to find Twisted projects for which to generate
            news (see L{findTwistedProjects}).
        @type baseDirectory: L{FilePath}
        """
        # Get all the subprojects to generate news for
        projects = findTwistedProjects(baseDirectory)
        # And order them alphabetically for ease of reading
        projects.sort(key=lambda proj: proj.directory.path)
        # And generate them backwards since we write news by prepending to
        # files.
        projects.reverse()

        for aggregateNews in [False, True]:
            for project in projects:
                if project.directory.basename() in self.blacklist:
                    continue
                topfiles = project.directory.child("topfiles")
                if aggregateNews:
                    news = baseDirectory.child("NEWS")
                else:
                    news = topfiles.child("NEWS")
                name = self._getNewsName(project)
                version = project.getVersion()
                yield topfiles, news, name, version
dataset/ETHPy150Open kuri65536/python-for-android/python-modules/twisted/twisted/python/_release.py/NewsBuilder._iterProjects/original