diff --git a/sierspinksi.py b/sierspinksi.py index 6363858..67f5498 100644 --- a/sierspinksi.py +++ b/sierspinksi.py @@ -59,3 +59,16 @@ def getMid(p1,p2): triangle(points,6) +To add colour: colored.red('red string') + +To change shell colour: def hilite(string, status, bold): +attr = [] +if status: +# green +attr.append('32') +else: +# red +attr.append('31') +if bold: +attr.append('1') +return '\x1b[%sm%s\x1b[0m' % (';'.join(attr), string)