You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This article discusses using the macros build into the ncurses library. We could do this approach but I also wanted to test out creating our own enums like below:
classcolors:
""" This is a class that helps with printing out colors to the terminal. """PINK='\033[95m'PURPLE='\033[94m'GREEN='\033[92m'YELLOW='\033[93m'RED='\033[91m'ENDC='\033[0m'
The text was updated successfully, but these errors were encountered:
Since ncurses is a C library and color pairs can only be bound to an integer, and not enums, it might be a good idea to have a wrapper class or function around the native ncurses color functions so we can use enums easily.
Also, there's a lot of ncurses patterns like this one below that should really just be a single function call:
This article discusses using the macros build into the ncurses library. We could do this approach but I also wanted to test out creating our own enums like below:
The text was updated successfully, but these errors were encountered: