""" Colorize Python program listings embedded in HTML pages This script is used during the build process of "Dive Into Python" (http://diveintopython.org/) to recreate syntax highlighting of the Python program listings and code examples embedded in the HTML pages by wrapping Python keywords in or tags. The following tags are presumed to contain Python code:
...
... (These tags are generated automatically by the DocBook XSL stylesheets when the book is transformed from XML to HTML.) Looks for 2 arguments on the command line. The first argument is a file or directory. If a file, the file is processed; if a directory, all .html files in the directory are processed. The second argument, if given, is a flag for the type of tags to wrap around keywords. 0 (default) - use tags, where xxx in ('comment', 'string', 'keyword', 'function', 'class'). Actual syntax highlighting must be defined in a