I've just submitted a module template.py to the source tree at http://www.vex.net/parnassus/resource.py. This module was primarily written for handling templates of HTML files in CGI scripts but can be used in any kind of programm that needs to use pre-prepared textfiles with variable content. Check out the description I entered for more details.
You can download it at http://members.aon.at/sparhawk in the download section and you can email me at email@example.com if you have question concerning the use or bug reports. I don't expect problems, though, because it is fairly easy to use. :)