Full threadyangyang·Could probably use contextlib to simplify the implementation a bit: http://docs.python.org/library/contextlib.html. Indeed HTML generation is the first example.View on HN