Syntax Coloring

Greg Krohn ('rot-13') 'tert at pncen.hf'.decode
Sat May 3 16:47:36 EDT 2003


"Salvatore" <artyprog at wanadoo.fr> wrote in message
news:b913v2$3n3$1 at news-reader11.wanadoo.fr...
> 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 ?
>
> Thanks
>
> Salvatore
>

Could you use the output of py2html and:
  * replace the spaces at the beginning of lines with ' '.
  * add '<BR>' to the end of the lines.
  * replace the '<PRE>' tag with '<DIV style="font-family: monospace;">' and
the closing tag to match.


greg






More information about the Python-list mailing list