Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions sierspinksi.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)