# HG changeset patch # User Goffi # Date 1397857012 -7200 # Node ID f0e407709d8ef39e832e80668e13f182ffa0c270 # Parent 93359853e4bc063dcbcbe79e02147ae08adb7c22 core (constants): added some basic ANSI escape codes diff -r 93359853e4bc -r f0e407709d8e src/core/constants.py --- a/src/core/constants.py Thu Apr 10 16:12:50 2014 +0200 +++ b/src/core/constants.py Fri Apr 18 23:36:52 2014 +0200 @@ -75,3 +75,13 @@ ## Misc ## SAVEFILE_DATABASE = "sat.db" IQ_SET = '/iq[@type="set"]' + + ## ANSI escape sequences ## + # XXX: used for logging + # XXX: there will be probably moved in a dedicated module in the future + ANSI_RESET = '\033[0m' + ANSI_NORMAL_WEIGHT = '\033[22m' + ANSI_FG_BLACK, ANSI_FG_RED, ANSI_FG_GREEN, ANSI_FG_YELLOW, ANSI_FG_BLUE, ANSI_FG_MAGENTA, ANSI_FG_CYAN, ANSI_FG_WHITE = ('\033[3%dm' % nb for nb in xrange(8)) + ANSI_BOLD = '\033[1m' + ANSI_BLINK = '\033[5m' + ANSI_BLINK_OFF = '\033[25m'