python source -> html

Brian Quinlan brian at sweetapp.com
Sun Dec 15 16:01:01 EST 2002


I've developed a very over-engineered source => styled-html generator:
http://silvercity.sourceforge.net/

It uses the Scintilla styling engine so it can process source files in a
variety of languages. It can also style portions of your source using a
different language style, which is why I developed it in the first place
e.g.

print 'Content-type: text/html'
print
print '''<html><head><title>foo</title></head>...'''

The contents of the second string could (optionally) be styled using the
HTML styler.

It also creates hyperlinks whenever it finds URLs, PEPs or RFCs in your
source. Here is an example:

http://www.sweetapp.com/cgi-bin/cgi-styler.py?source=../xmlrpc/xmlrpclib
.py


Cheers,
Brian





More information about the Python-list mailing list