ansi.py: add sgr code, sgr attributes, and demos