Definition at line 30 of file history.py.
def lsst.pex.config.history.Color.__init__ |
( |
|
self, |
|
|
|
text, |
|
|
|
category |
|
) |
| |
Return a string that should display as coloured on a conformant terminal
Definition at line 52 of file history.py.
54 """Return a string that should display as coloured on a conformant terminal"""
56 color = Color.categories[category]
58 raise RuntimeError(
"Unknown category: %s" % category)
61 x = color.lower().split(
";")
62 self.color, bold = x.pop(0),
False
65 if props
in (
"bold",):
69 self.
_code =
"%s" % (30 + Color.colors[self.color])
71 raise RuntimeError(
"Unknown colour: %s" % self.color)