Syntax Coloring

Glyn Millington glyn at millingtons.org
Sat May 3 16:01:47 EDT 2003


Salvatore <artyprog at wanadoo.fr> writes:

> Hello,
>
> I have a Forum site for beginners in Python
> running on Zope Squishdot.
> I would like to publish python scripts with syntax coloring.
> Although Squishdot support HTML tags it does not support the <PRE> tag
> Does anyone have a solution ?

Well, I typed py2html into Google and got this.......

http://www.norvig.com/python/py2html.html

8<------8<------8<------8<------8<------8<------8<------8<------8<------

#!/usr/local/bin/python
"""Pretty-print Python code to colorized, hyperlinked html.
In python, do:
    py2html.convert_files(['file1.py', 'file2.py', ...])
>From the shell, do:
    python py2html.py *.py"""

8<------8<------8<------8<------8<------8<------8<------8<------8<------


any use?



Glyn




More information about the Python-list mailing list