def index(self):
        """Stream HTTP response body of generator app index URI."""
        # Let's make up a list of users for presentation purposes
        users = ['Remi', 'Carlos', 'Hendrik', 'Lorenzo Lamas']

        # Every yield line adds one part to the total result body.
        yield self.header()
        yield '<h3>List of users:</h3>'

        for user in users:
            yield '%s<br/>' % user

        yield self.footer()
Stream HTTP response body of generator app index URI.
cherrypy/tutorial/tut08_generators_and_yield.py