[Python-checkins] r71255 - python/trunk/Lib/cgitb.py

georg.brandl python-checkins at python.org
Sun Apr 5 20:34:58 CEST 2009


Author: georg.brandl
Date: Sun Apr  5 20:34:58 2009
New Revision: 71255

Log:
#602893: add indicator for current line in cgitb that doesnt rely on styling alone.

Modified:
   python/trunk/Lib/cgitb.py

Modified: python/trunk/Lib/cgitb.py
==============================================================================
--- python/trunk/Lib/cgitb.py	(original)
+++ python/trunk/Lib/cgitb.py	Sun Apr  5 20:34:58 2009
@@ -141,10 +141,11 @@
             i = lnum - index
             for line in lines:
                 num = small(' ' * (5-len(str(i))) + str(i)) + ' '
-                line = '<tt>%s%s</tt>' % (num, pydoc.html.preformat(line))
                 if i in highlight:
+                    line = '<tt>=&gt;%s%s</tt>' % (num, pydoc.html.preformat(line))
                     rows.append('<tr><td bgcolor="#ffccee">%s</td></tr>' % line)
                 else:
+                    line = '<tt>&nbsp;&nbsp;%s%s</tt>' % (num, pydoc.html.preformat(line))
                     rows.append('<tr><td>%s</td></tr>' % grey(line))
                 i += 1
 


More information about the Python-checkins mailing list