x = 30 for dark, light in zip(dark_colors, light_colors):
codes[dark] = esc + "%im" % x
codes[light] = esc + "%im" % (60 + x)
x += 1
del dark, light, x
codes["white"] = codes["bold"]
def reset_color(): return codes["reset"]
def colorize(color_key, text): return codes[color_key] + text + codes["reset"]
def ansiformat(attr, text): """
Format ``text`` with a color and/or some attributes::
color normal color
*color* bold color
_color_ underlined color
+color+ blinking color """
result = [] if attr[:1] == attr[-1:] == '+':
result.append(codes['blink'])
attr = attr[1:-1] if attr[:1] == attr[-1:] == '*':
result.append(codes['bold'])
attr = attr[1:-1] if attr[:1] == attr[-1:] == '_':
result.append(codes['underline'])
attr = attr[1:-1]
result.append(codes[attr])
result.append(text)
result.append(codes['reset']) return''.join(result)
¤ Dauer der Verarbeitung: 0.12 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.