Qpy provides a convenient mechanism for generating safely-quoted html text from python code. It does this by implementing a quoted-string data type and a modification of the python compiler. (This main idea comes from Quixote's htmltext/PTL.)
Python 2.4 (or newer). Tested on Linux and OS X. The package will work best if installed on a system with a C compiler, so that the C-extension can be used.
Qpy 1.6 was released on 2 May 2007.
Qpy can be discussed on the the QP mailing list.