Use python 3 syntax to check python version
Fix color bug in tty terminals