From: Raymond Hettinger Date: Sun, 1 Jul 2012 05:19:04 +0000 (-0700) Subject: Small cleanups X-Git-Tag: v3.3.0b2~344 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fd490cc0523479de87f3894f91074d8c876f7491;p=thirdparty%2FPython%2Fcpython.git Small cleanups --- diff --git a/Tools/scripts/README b/Tools/scripts/README index eb28a9e1f4ae..e7e2ddeafbf3 100644 --- a/Tools/scripts/README +++ b/Tools/scripts/README @@ -47,6 +47,7 @@ pdeps.py Print dependencies between Python modules pickle2db.py Load a pickle generated by db2pickle.py to a database pindent.py Indent Python code, giving block-closing comments ptags.py Create vi tags file for Python modules +pycolorize Python syntax highlighting with HTML output. pydoc3 Python documentation browser pysource.py Find Python source files redemo.py Basic regular expression demonstration facility diff --git a/Tools/scripts/pycolorize.py b/Tools/scripts/pycolorize.py index 6edd223c293b..c5c96110d82c 100755 --- a/Tools/scripts/pycolorize.py +++ b/Tools/scripts/pycolorize.py @@ -66,17 +66,25 @@ default_css = { } default_html = '''\ - + + %s - + + ''' def build_page(source, html=default_html, css=default_css): 'Create a complete HTML page with colorized Python source code' - css_str = ''.join(['%s %s\n' % item for item in css.items()]) + css_str = '\n'.join(['%s %s' % item for item in css.items()]) result = colorize(source) return html % (css_str, result)