If you're using vim [1] as your editor, or even if you have it installed, you can make use of the 2html.vim script [2] to convert your python code to HTML complete with syntax highlighting.
In vim, try running: :run! syntax/2html.vim If you don't want to run vim as your editor, but just want to convert a file to HTML, you can try something like: gvim -f +"syn on" +"run! syntax/2html.vim" +"wq" +"q" mypython.py Cheers, Chris [1] http://www.vim.org [2] http://vimdoc.sourceforge.net/htmldoc/syntax.html#2html.vim -- http://mail.python.org/mailman/listinfo/python-list