An improved print function
An improved print function that can handle simple ANSI color escape sequences.