When using an IDE like PyCharm python is being called via pydevd.py (is parent?). On command prompt like cmd.exe scripts can use the prompt color sequences e.g. "\\033[