I've recently tried the docutils's reST module with Pygments ( to highlight Python sources), so you can have LaTeX + HTML + PDF output (You can see what it renders here : h**p://kib2.free.fr/geoPyX/geoPyX.html ). It worked fine, but needs a little work to suit your needs (you'll have to write your own CSS, and maybe your LaTeX preambule ).
For OpenOffice, a friend wrote a little Python script that colourize a Python source inside a document. I think It will be possible to write your own for HTML output, but the ooo API docs aren't well documented for Python. Chears, 6Tool9 -- http://mail.python.org/mailman/listinfo/python-list