Colorized HTML from Python source
Michael A. Miller
mmiller3 at iupui.edu
Mon Sep 25 13:33:29 EDT 2000
More information about the Python-list mailing list
Mon Sep 25 13:33:29 EDT 2000
- Previous message (by thread): Colorized HTML from Python source
- Next message (by thread): Colorized HTML from Python source
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
>>>>> <insyte at petra.squad51.net> writes: > Is there a standard utility for reading Python source and > producing a spiffy colorized HTML version? You can use the HTMLgen and HTMLutil.markup to do a simple colorizing... #!/usr/bin/env python import sys import HTMLgen, HTMLutil, HTMLcolors if len(sys.argv)==3: infile = sys.argv[1] outfile = sys.argv[2] else: print 'Usage: %s infile outfile' % sys.argv[0] sys.exit(0) d = HTMLgen.SimpleDocument(bgcolor=HTMLcolors.WHITE,title=infile) d.append(HTMLutil.markup(infile)) d.write(outfile)
- Previous message (by thread): Colorized HTML from Python source
- Next message (by thread): Colorized HTML from Python source
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list