python html rendering
Duncan Booth
duncan.booth at invalid.invalid
Wed Oct 4 05:39:42 EDT 2006
"GHUM" <haraldarminmassa at gmail.com> wrote:
>> Hi, Im looking for a way to display some python code
>> in html: with correct indentation, possibly syntax hiliting, dealing
>> correctly with multi-line comment,
>
><tongue - in - cheek - mode>
> the usual way is to create your own web-framework
></tongue - in - cheek - mode>
Or you could use an existing web framework: Plone has the ability to
colour python code built-in.
> If it is just "some" Python code and you have to do it "once", just
> look at scite. Scite can colour your code, and you can export it as
> HTML.
and if you need it more than once you can always find one of the existing
chunks of colouring code and modify/reuse it. See Plone's
PortalTransforms/transforms/python.py, or the MoinMoin code it was cribbed
from.
https://svn.plone.org/svn/archetypes/PortalTransforms/trunk/transforms/python.py
More information about the Python-list
mailing list